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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 very large tables combination

Author  Topic 

noamg
Posting Yak Master

215 Posts

Posted - 2002-10-02 : 02:57:27
hi,

I have a GUI-screen with five checkboxes, when every checkbox represents a subject =table. All the combination are ligal.
When the user press "ok", a query should be running and bring the relevant recordset.
It is unpossible to define all the store-procedures advance.
Any idea, how to write smart join / smart query that can be prepare on developing time and not at run-time ?

thanks
Noam





Noam Graizer

nr
SQLTeam MVY

12543 Posts

Posted - 2002-10-02 : 03:14:40
Sounds a bit like a design problem but if you want to go with this.
Only 5 checkboxes - you can use if statements in the SP or a union with @tbl1checkbox = 1 in the where clause.
Otherwise build up the resultset in a temp table or use dynamic sql.


==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.

Edited by - nr on 10/02/2002 03:20:15
Go to Top of Page
   

- Advertisement -