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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-05-24 : 07:44:48
|
| randy writes "first of all, pardon my english.. :))i need to combine 10 tables for a query and combine it with several different 'where clause'.so i made the query into a 'view', called it from a store proc, and put a different 'where clause' in the end for each cases.but the problem is, it exceeded 256 tables in a query.do you know how to minimize the uses of the tables, but still can fullfil the needs of different 'where clause'?regards,randy" |
|
|
chiragkhabaria
Master Smack Fu Yak Hacker
1907 Posts |
Posted - 2006-05-24 : 07:46:45
|
| make a different views and combine the views togatherIf Debugging is the process of removing Bugs then i Guess programming should be process of Adding them. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2006-05-24 : 17:05:51
|
| Have you tried using the CASE statement in the WHERE clause? You probably don't have to do any nesting at all. You could also use derived tables to do this. Also, post the query and some sample data. Maybe we can see a quick way to improve it.MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|