Re: Preparing statements in a stored procedure...
Posted in 1997
Dan Michaelis wrote: > The bottom line is that I need to be able to do this, preferably in a stored procedure. The dynamic naming of the third table table name and > column name is where the problem lies. I'm willing to entertain anything at this point... > > Thanks in advance, > > Dan Michaelis > Client Information Manager, Dede Wallace Center Hi Dan, I'm using SYBASE SQL ANYWHERE and in my stored procedures I'm using "execute immediate" SQL command like this: ... execute immediate 'UPDATE TABLE1 SET '||table_column_name||' =('||table_column_name||'+1) WHERE column_foo='||specific_value ... where table_column_name is parameter that stored procedure receives. In this specific command, I know which table I need, but parameter that stored procedure receives determines which column I want to modify (to add 1 to old value). I hope that this helps. Petar