SQL help

  • We are currently upgrading MFK. thanks! -neo

redman88

Feeder Fish
MFK Member
Sep 3, 2009
164
0
0
Artesia, NM
SELECT [cubical check list for next loaner].NMCD, [cubical check list for next loaner].Last, [cubical check list for next loaner].First, [cubical check list for next loaner].dateRequestedLoaner, [cubical check list for next loaner].dorm, [cubical check list for next loaner].ExpectedOutDate, [cubical check list for next loaner].[IHP?], [check cubical for TV].cubicalNumber
FROM [check cubical for TV] INNER JOIN [cubical check list for next loaner] ON [check cubical for TV].cubicalNumber = [cubical check list for next loaner].cubicalNumber;



this pulls the info i dont want to see.................:irked:
 
Please give us some text description on
what question the query is attempting to answer.
The code selects what it's asked.

SELECT [TABLE2].NMCD
, [TABLE2].Last
, [TABLE2].First
, [TABLE2].dateRequestedLoaner
, [TABLE2].dorm
, [TABLE2].ExpectedOutDate
, [TABLE2].[IHP?]
, [TABLE2].cubicalNumber
FROM [TABLE1]
INNER JOIN [TABLE2] ON [TABLE1].cubicalNumber = [TABLE2].cubicalNumber;

If you want values from TABLE2 that are not in TABLE1 then

SELECT [TABLE2].NMCD
, [TABLE2].Last
, [TABLE2].First
, [TABLE2].dateRequestedLoaner
, [TABLE2].dorm
, [TABLE2].ExpectedOutDate
, [TABLE2].[IHP?]
, [TABLE2].cubicalNumber
FROM [TABLE2]
WHERE NOT EXISTS (SELECT 1 FROM [TABLE1] WHERE [TABLE1].cubicalNumber = [TABLE2].cubicalNumber)
 
what i am trying to do is pull all the the records for inmates that don't have a TV in thier cubical. every inmate has a bunk and every bunk is part of a cubical.
 
Your table names make my nose bleed. thx.
So do you have any more questions.
 
yeah some help figuring out why i can't get the info i am looking for just every thing i am not looking for
 
I already gave you the code in post #3.
That will be $200 please.
 
MonsterFishKeepers.com