Home » RDBMS Server » Performance Tuning » update query in to stored procedure
update query in to stored procedure [message #65337] Wed, 11 August 2004 02:11 Go to next message
sanjay jadhav
Messages: 1
Registered: August 2004
Junior Member
suppose i want to write the query into stored proceudre for update

can i append the name of the filed into query dynamicaly

e.g.
update (table name ) set @fieldname = 1 where ....
Re: update query in to stored procedure [message #65338 is a reply to message #65337] Wed, 11 August 2004 02:37 Go to previous messageGo to next message
D SINGH
Messages: 5
Registered: August 2004
Junior Member
U can do it through

str :='update statement'
EXECUTE_IMMEDIATE(STR)

D singh
Re: update query in to stored procedure [message #65340 is a reply to message #65338] Wed, 11 August 2004 03:53 Go to previous message
Daljit Singh
Messages: 290
Registered: October 2003
Location: Texas
Senior Member
Hi,

Every thing is correct except the syntax instead of using :

EXECUTE_IMMEDIATE(STR)

use :

EXECUTE IMMEDIATE STR

Daljit Singh
Previous Topic: Tuning Stored Procedure that updates table of size 1 gb
Next Topic: Not used index
Goto Forum:
  


Current Time: Fri Mar 29 05:00:16 CDT 2024