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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Provide where clause from a table

Author  Topic 

allan8964
Posting Yak Master

249 Posts

Posted - 2011-12-13 : 10:30:53
Hi there,

See this thread for scenarios: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=168260

Now I need to provide the conditions in where clause by drawing rows from tblCondition which has strings like Type='EP3' or Code=210, etc. That means each time I need grab a row from tblCondition to be in this where clause then get a group of aggregated data, ... then another row from tblCondition then doing the same calculation and so forth to loop down till the end rows in tblCondition. How can I do this? Thanks in advance.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-12-13 : 10:34:45
as before you have not given us enough information on this requirement.
Post some sample data and output you want in below format and then somebody will take a look and help you out

http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -