Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to use ISNLL() Function.

Author  Topic 

hspatil31
Posting Yak Master

182 Posts

Posted - 2011-05-30 : 09:19:26
Hi All,

I am having following query i am trying to fetch NULL records onl.
I am passing Code and Dialed_Digits, Code='998' and Dialed_Digits is null.

Can anybody tell me how to fetch the null record's only ?

I can't use Dialed_Digits IS NULL coz some times Dialed_Digits is having value. Plz suggest me any solution on this ?

SELECT INRS.ID AS Normalized_Rate_Sheet_ID, WS.ID as Work_Sheet_ID,Call_Completion, INRS.Rate
FROM tb_lcr_international_normalized_rate_sheet INRS
INNER JOIN tb_lcr_work_sheet WS ON INRS.Work_Sheet_ID=WS.ID
INNER JOIN tb_lcr_rate_sheet RS ON RS.ID=WS.Rate_Sheet_ID
INNER JOIN tb_lcr_carrier C ON C.ID=RS.Carrier_ID
INNER JOIN tb_lcr_country Coun on COUN.ID=INRS.Country_ID
WHERE COUN.Code='998' AND Dialed_Digits=ISNULL(Dialed_Digits,'') AND INRS.Status=1 AND RS.ID IN
(SELECT Rate_Sheet_ID FROM tb_lcr_rate_deck_detail RD
INNER JOIN tb_lcr_rate_deck_carrier_rate_sheet RDRSH on RDRSH.Rate_Deck_Details_ID=RD.ID WHERE RD.ID='6289FA68-AB4A-434F-8EDA-02901E1319D6') ORDER BY INRS.Rate,C.priority,INRS.Work_Sheet_ID

Thnks,
Harish

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2011-05-30 : 09:26:54
Dialed_Digits IS NULL

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page
   

- Advertisement -