|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Getting specific rows problem
Hi all,
I am trying to write a stored procedure that will be used to make a large looped report. I have 4 tables: Office, Client, Location, and Items Each Office has at least one client Some clients do not have a Location, some do Some Locations do not have items in it, some do How can I grab all of the clients who don't have a location? What would be the query for that? Thanks, Sanctos |
|
#2
|
|||
|
|||
|
Hi sanctos2003
you can join each table using outer join (left or right), if there are no matching key, the result will be null value. you can detect the null value indicates that there are clients that have no location. |
![]() |
| Viewing: ASP Free Forums > Database > Microsoft SQL Server > Getting specific rows problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|