SQL Assistance

HolyForce

I will show you...
What is the Transact-SQL/MSS equivalent of the following:

SELECT *
FROM dual
WHERE some_id = 123
AND some_value <> 'ABC'

I'm seeking to return all columns for rows in 'dual' where the 'some_id' equals '123' but additionally of those rows where 'some_value' ISN'T 'ABC'.

Thanks in advance.
 
For anyone who cares, the above basically did work; it was more/less how the DB was setup to handle NULLs.

Despite my some_value being NULL, which isn't 'ABC'; the DB handles the NULL some way I'll have to study because NULL doesn't count as being or not being something. We always knew NULL and empty string, for example, were not the same thing. However, it seems NULL even adds a third layer of logic. No more is the water hot or cold... is the water hot, cold, or NULL?

Ugh.

I doubt any of you care. :)
 
I was thinking about this one actually, I just figured you could add an AND statement to throw out rows that returned NULLS.
 
Back
Top