If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Other PC Databases > update query with dynamic tablename obtained from the result of select query

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-28-09, 02:02
chims chims is offline
Registered User
 
Join Date: May 2009
Posts: 5
Question update query with dynamic tablename obtained from the result of select query

In my stored procedure , I have a select statement which retrieves some table names based on where condition.
I have to update a particular column in all these tables using update query.
my select query is

select so.name from sysobjects so,syscolumns sc where sc.id = so.id
and sc.name = 'productNum' and so.type = 'U'order by so.name

how can we give these dynamic tables in an update statement

kind of urgent.. please help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On