March 22, 2012 at 4:45 am
Hi,
I have a column named 'SQLs' in Table A and the column 'SQLs' has SQL statements as data, like this:
select '21/03/2012' as date_modif_create, 'tblAddressesGP' as table_name, count(*) as total_rows_modified_updated from tblAddressesGP
select '21/03/2012' as date_modif_create, 'tblAddressesPatient' as table_name, count(*) as total_rows_modified_updated from tblAddressesPatient
select '21/03/2012' as date_modif_create, 'tblAddressRolesGP' as table_name, count(*) as total_rows_modified_updated from tblAddressRolesGP
I need to run these all statements in one go by like running a procedure and pass SQL statement/column 'SQLs' data as a parameter. Is it doable in SQL Server 2000?
Any ideas? Your advice would be appreciated.
Thanks in Advance.
Thamil K
March 22, 2012 at 7:58 am
This should help. http://msdn.microsoft.com/en-us/library/aa933299%28v=sql.80%29.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
March 22, 2012 at 8:22 am
Please don't cross post. Direct all replies to the original thread here. http://www.sqlservercentral.com/Forums/Topic1270724-8-1.aspx
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply