Jump to content

sql help


rikki

Recommended Posts

i have a list of sql statements in my middle tier like this 

exec proc 'a','b'

exec proc 'a2','b2'

exec proc 'a3','b3'

exec proc 'a4','b4'

how do I send all these sql statements to a proc and execute them or by any other way?

Link to comment
Share on other sites

aa tble lo identity undaa??

if yes... use some while loop...

or use something lky cursors...

or use ssis - use for each loop ado enumerator and use table in that... frst select records frm table n nxt use execute sql task to pass values to tht stored proc...

Link to comment
Share on other sites

15 minutes ago, mtkr said:

aa tble lo identity undaa??

if yes... use some while loop...

or use something lky cursors...

or use ssis - use for each loop ado enumerator and use table in that... frst select records frm table n nxt use execute sql task to pass values to tht stored proc...

no while loop it is just a text but it is in the form of "Exec proc 'valu1', 'valu2'; Exec proc 'valu3', 'valu4';" 

Link to comment
Share on other sites

forget about tables here 

there is a proc name 'HelloProc' which has 2 parameters 

I have a string like this 'Exec HelloProc para1, para2; Exec HelloProc para3, para4; Exec HelloProc para5, para6;.."

yes it is same proc 

para1, para2, etc are just some values 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...