Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 8 of 8 total
Thread sql/psm parameter
Tue, Nov 18 2008 2:41 AMPermanent Link

"Hershcu S"
Hello

I create a procedure with a parameter.
I want to use the parameter as tablename value on the statement
start transaction on tables <tablename>

When I execute the procedure it raise an error on the tablename parameter
Do I miss something?

Thanks Sorin

Tue, Nov 18 2008 6:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Hershcu


Parameters aren't usable for things like table column names.

Roy Lambert [Team Elevate]
Tue, Nov 18 2008 7:11 AMPermanent Link

"Hershcu S"
So if I undertand right I can't call a procedure with the statement
"start transaction on Table1"
and send a parameter to replace the Table1?

Are there other alternative if I want to use the same procedure with
differents tables?
Thanks Sorin



"Roy Lambert" <roy.lambert@skynet.co.uk> wrote in message
news:A8BB047C-BFAF-4DEA-AA08-681FF93A5470@news.elevatesoft.com...
> Hershcu
>
>
> Parameters aren't usable for things like table column names.
>
> Roy Lambert [Team Elevate]
>

Tue, Nov 18 2008 8:00 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Hershcu

The only things I can come up with is trying (don't know if it will work) is a set of IFs along the lines of

IF paramtable = 'tablename' THEN START  TRANSACTION ON xxxxxx

or creating the procedure on the fly

Roy Lambert [Team Elevate]
Tue, Nov 18 2008 10:24 AMPermanent Link

"Hershcu S"
> The only things I can come up with is trying (don't know if it will work)
> is a set of IFs along the lines of
>
> IF paramtable = 'tablename' THEN START TRANSACTION ON xxxxxx
>
> or creating the procedure on the fly

Thanks Roy

Tue, Nov 18 2008 1:47 PMPermanent Link

"Hershcu S"
BTW   can you recomend any good book on sql/psm?
Sorin

Tue, Nov 18 2008 2:13 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Hershcu


I wish I could - I could use one myself.

Roy Lambert
Tue, Nov 18 2008 2:49 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Herschu,

<< BTW   can you recomend any good book on sql/psm? >>

Here is one:

http://search.barnesandnoble.com/Understanding-the-New-SQL-Psm/Jim-Melton/e/9781558604612

Jim Melton's books are usually very good.  However, be aware that the EDB
SQL/PSM implementation is slightly different than the standard in terms of
dynamic SQL preparation/execution and exception handling.  However, apart
from those two items, the rest is the same (looping, branching, parameters,
etc.).

--
Tim Young
Elevate Software
www.elevatesoft.com

Image