Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

DateTime Value NULL or Not

$
0
0

How to write a query whether a date value is NULL ?

I want to check is expiry date is NULL or not .

eg,

select t_cpls as sales_price_list,t_item as item,t_stdt as effective_date,t_tdat as expiry_date,
t_pric as selling_price from ttdsls032010 T1
where t_cpls = ''
and t_stdt=(select max(T2.t_stdt) from ttdsls032010 T2 where T2.t_item =T1.t_item and  t_cpls = '')
order by t_item


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>