SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Unable to fetch Details
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

nistala86
Starting Member

1 Posts

Posted - 02/12/2014 :  01:55:51  Show Profile  Reply with Quote
Hi

i created a view with a simple join query

there are 2 rows with orderid as null, i am unable to fetch the details when i give WHERE Condition as

"select orderid from joins where orderid=NULL"

Query :

create view joins as
select A.customerid,A.Companyname,A.Contactname,A.City,B.OrderId from Customers A
left join orders B
on A.Customerid=B.Customerid

kindly help

Regards
Ramakrishna

khtan
In (Som, Ni, Yak)

Singapore
17586 Posts

Posted - 02/12/2014 :  03:11:46  Show Profile  Reply with Quote
select orderid from joins orders  where orderid IS NULL



KH
Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000