April 8, 2002 at 8:14 am
I am getting nulls in my result set when I know the data exist.
Using SQl Server7(sp3)
Select name, date, dept from table
where
date between '2/2/02' and '2/4/02'
and dept = red
Now if I do a select * from the table or just use the date portion of the where I get values back in the dept column. Has anyone encountered this and have any suggestions?
TIA
Yvonne
April 8, 2002 at 8:37 am
Try
Select name, date, dept from table
where
(date between '2/2/02' and '2/4/02')
and dept = 'red'
You should always put between statements in () to make sure parses correctly.
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
April 8, 2002 at 8:55 am
Thanks for the suggestion. I still get the nulls.
April 8, 2002 at 9:12 am
Maybe I am missing something, can you post an example of what you get as the output. Also please post the table DDL so I can see what happens here please?
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 4 posts - 1 through 4 (of 4 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