question

Jami avatar image
Jami asked

Query Help with null values

I have following table structure i m using sql 2000

create table mytab (pid varchar(10), a_check char(1), b_check char(1) detail varchar(30))

it has following data

insert into mytab values ('abc1','A','A','good') insert into mytab values ('abc1',null,null,'') insert into mytab values ('abc2','A','B','good') insert into mytab values ('abc2',null,null,'') insert into mytab values ('abc3','A','A','good') insert into mytab values ('abc3','A','B','Fair')

what i want in result those PID where value of both a_check and b_check is not null in all rows

like in above data set i want only pid values to be return is

abc3

i dont want abc1 and abc2 in result as one row of them contains null

Regards

sql-server-2000
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Squirrel 1 avatar image
Squirrel 1 answered
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.