I originally posted this in the ASP forum, but they suggested I try here. This is a weird one. I have a sql 2000 table with telephone billings from sept-oct. When I execute the following statement, I get the time column mixed in with the phone number column. When I remove the word distinct from the query, I get only the phone numbers. What's up with that? I checked the data many times just to make sure there were only phone numbers in the phone number column and it's all correct and accurate.
When DISTINCT is removed, only the phone numbers are returned, just like it's supposed to be. I've used GROUP BY, and IS NOT NULL, I've exhausted my ideas. NONE of the other columns do that when I use DISTINCT. Any thoughts? Thanks.
Code:
SELECT DISTINCT ([Phone Number])
FROM Oct212004