August 29, 2006 at 4:10 pm
I am lost on why this query is not showing any missing data. I know it is there I can query specific tracking codes in ebill and they do not exist. When I do this simple select it shows that everything in tbl_tracking exists in ebill. Can any of you see what I am doing wrong? tracking code in tbl_tracking does not allow Nulls where Tracking_Number in ebill allows nulls. There are both set to be varchar 30. If I do an IN it pulls records but not all. So I know some are missing.
Select * FROM Tbl_Tracking
WHERE Convert(Varchar(30),[Tracking_Code])
NOT IN (
SELECT Convert(varchar (30),Tracking_number)
FROM Ebill
)
August 29, 2006 at 4:30 pm
Stupid SQL. It is because there are nulls in tracking number. If I make the nulls 0 then I get all kind of results.
August 29, 2006 at 4:43 pm
That's also why it's better to use outer joins for queries like that .
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy