Hi,
I'm trying check the records which satisfies the following condn.
select @p1 = su1 from RER where (no=10 and atp ='N')
It returns empty list . bcos no match found.that's ok.
But i need to write the logic if record is not there.
i tried to do as follows
if ((@p1 =null) or (p1=' '))
...some logic
else
.. other logic
It's always executing else case. How do i catch empty value using sql query.
Is there any command there like null?
I tried in SQL query analyzer. Using SQL 2000.
Thank You.
I'm trying check the records which satisfies the following condn.
select @p1 = su1 from RER where (no=10 and atp ='N')
It returns empty list . bcos no match found.that's ok.
But i need to write the logic if record is not there.
i tried to do as follows
if ((@p1 =null) or (p1=' '))
...some logic
else
.. other logic
It's always executing else case. How do i catch empty value using sql query.
Is there any command there like null?
I tried in SQL query analyzer. Using SQL 2000.
Thank You.