Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where should my conditions go ?
Message
 
To
01/07/2011 09:54:46
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01517006
Message ID:
01517237
Views:
70
>>>Must be Friday
>>>
>>>If I am selecting from multiple tables should my join have any conditions in it
>>>
>>>like
>>>
>>>  join attribute
>>>	on attribute.individual_ref = I.individual_ref
>>>        and attribute.attr_code_ref=9289	
>>>where condition
>>>
>>>
>>>or should I have
>>>
>>>
>>> join attribute
>>>	on attribute.individual_ref = I.individual_ref
>>>where condition
>>>        and attribute.attr_code_ref=9289	
>>>
>>>
>>>thanks
>>
>>When you have INNER join it doesn't matter.
>>But if you have right or left join the condition should be in the JOIN not in WHERE.
>
>Thank Boris
>
>can you point me at an explanation of that rule. I think aomi did a while ago but I can't finr the message.
>
>No worries if you can't :-)

Sorry Nicholas,
I wasn't over my computer for the weekend.
I saw that Naomi already answered to you. :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform