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 2008 Forums
 Transact-SQL (2008)
 Filter condition

Author  Topic 

haroon2k9
Constraint Violating Yak Guru

328 Posts

Posted - 2010-03-01 : 06:22:04
hi,
1.How about adding the filter conditon like in the joins statements

ON follwed by AND filter Condition.

or

using where condition at the end of the table

could you please explain me about the 2 appraoaches.

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2010-03-01 : 06:44:32
depends on your joins

If it is a INNER JOIN, the effect of adding in ON and WHERE is the same.

It is normal practice to specify filter condition in WHERE clause and leave ON clause to the join condition of the 2 tables



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

haroon2k9
Constraint Violating Yak Guru

328 Posts

Posted - 2010-03-01 : 07:35:57
quote:
Originally posted by khtan

depends on your joins

If it is a INNER JOIN, the effect of adding in ON and WHERE is the same.

It is normal practice to specify filter condition in WHERE clause and leave ON clause to the join condition of the 2 tables



KH
[spoiler]Time is always against us[/spoiler]





Thank you very much khtan.
Go to Top of Page
   

- Advertisement -