|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Statement help
Need a little help with this.
Here is the statement I am using now: select * from fileload inner join gmpartsmaster on fileload.partnum = gmpartsmaster.partnum where dealercode = '510571-03' However, the data I want to see is what is left over in fileload.partnum, not the data I am actually bringing back with the statement. Any help? |
|
#2
|
||||
|
||||
|
Quote:
What? |
|
#3
|
|||
|
|||
|
Quote:
I know....I apologize....let me see if I can explain, and I'm sure there is an easier....I just don't know it. I want to select from fileload.partnum that ARE NOT in gmpartsmaster.partnum I tried: select * from fileload inner join gmpartsmaster on fileload.partnum != gmpartsmaster.partnum where dealercode = '510571-03' but that brings back everything (both fileload.partnum and gmpartsmaster.partnum) I just want to pull the partnumbers from fileload that are not in gmpartsmaster.partnum. |
|
#4
|
|||
|
|||
|
select fileload.*, gmpartsmaster.partnum
from fileload Left join gmpartsmaster on fileload.partnum = gmpartsmaster.partnum where (fileload.dealercode = '510571-03') and (gmpartsmaster.partnum is null); S- |
|
#5
|
||||
|
||||
|
Or
Code:
SELECT * FROM fileload WHERE partnum NOT IN ( SELECT DISTINCT partnum FROM gmpartsmaster ) |
|
#6
|
|||
|
|||
|
Thanks guys...those worked just fine. Appreciate it!
|
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Statement help |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|