Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
kdeutsch
Yak Posting Veteran
83 Posts |
Posted - 2009-08-19 : 12:26:06
|
| I am tring to write a stored procedure to pull a query from a table. I have a table full or queries that are assigned to personnel to run via a stored procedure. Problem is never done it and I am having trouble finding anything on web. Basically how can I create a stored procedure to call a sql query from a table?example query in table.intFilterID = 6strTaskName = 2x Non SelectstrProponent = PersonnelstrApprovalLevel = ManagerstrTaskCat = A1strSQLQuery = Select Case when PROM_CON_CODE in ('F3') then 'RED' else 'GREEN' END from SIDPERS..SIDPERS.PERS_SVCMBR_TBL where MPC = 'O' |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2009-08-19 : 13:11:17
|
| Can you create (one or more) parameterized stored procedures and just store the parameters in the table?EDIT:Post a real example of the data that would be stored and the resulting "query".Be One with the OptimizerTG |
 |
|
|
|
|
|