Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple query gone wrong?

Status
Not open for further replies.

PureSlate

MIS
Oct 25, 2010
34
US
Hi all,

I have a simple query here I was hoping somebody could look at. I created this query to pull only records from "GLHIST" which had no cooresponding record in "GLMAST."


SELECT GLHIST.* INTO GL
FROM GLHIST LEFT JOIN GLMAST ON GLHIST.[Account Number] = GLMAST.[Account Number]
WHERE (((GLMAST.[Account Number]) Is Null));

The query seems to be pulling everything instead. Anybody see what I missed?
 
What is the data type of [Account Number] in BOTH tables ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Data type for both is text.

Found the problem I think, one was "#######" and the other was " #######". Spaces get me all the time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top