Subject | RE: [firebird-support] for select stored procedure question |
---|---|
Author | Raith,Daniel |
Post date | 2013-10-10T15:52:45Z |
I tried using my stored procedure in an update statement like so:
update MyTable
set ColumnA = initial_caps_proc( ColumnA )
but I get an error saying "function unknown. @1"
Daniel
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Woody
Sent: Thursday, October 10, 2013 10:43 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] for select stored procedure question
From: Raith,Daniel<mailto:draith@...>
Sent: Thursday, October 10, 2013 10:33 AM
To: firebird-support@yahoogroups.com<mailto:firebird-support@yahoogroups.com>
Subject: [firebird-support] for select stored procedure question
I want to write a stored procedure that updates two columns (all records) in a table to initial caps or camel case.
For example: "testing a test" -> "Testing A Test"
Why not just run a query to update the values if you only need to do it once?
Update MyTable set column_A = initial_caps_proc(column_A), column_B = initial_caps_proc(column_B)
if you really need a stored procedure that just returns the values and doesn't update them, then simply use this in the procedure:
for select initial_caps_proc(column_A), initial_caps_proc(column_B) from myTable
into :aa, :bb do
suspend;
Woody (TMW)
[Non-text portions of this message have been removed]
update MyTable
set ColumnA = initial_caps_proc( ColumnA )
but I get an error saying "function unknown. @1"
Daniel
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Woody
Sent: Thursday, October 10, 2013 10:43 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] for select stored procedure question
From: Raith,Daniel<mailto:draith@...>
Sent: Thursday, October 10, 2013 10:33 AM
To: firebird-support@yahoogroups.com<mailto:firebird-support@yahoogroups.com>
Subject: [firebird-support] for select stored procedure question
I want to write a stored procedure that updates two columns (all records) in a table to initial caps or camel case.
For example: "testing a test" -> "Testing A Test"
Why not just run a query to update the values if you only need to do it once?
Update MyTable set column_A = initial_caps_proc(column_A), column_B = initial_caps_proc(column_B)
if you really need a stored procedure that just returns the values and doesn't update them, then simply use this in the procedure:
for select initial_caps_proc(column_A), initial_caps_proc(column_B) from myTable
into :aa, :bb do
suspend;
Woody (TMW)
[Non-text portions of this message have been removed]