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.
| Author |
Topic |
|
tvspsekhar
Starting Member
20 Posts |
Posted - 2010-03-06 : 00:01:12
|
| Please correct the code I am attaching.SELECT TOWERSCH.LOCNO,TOWERSCH.TWRTYPE,TWRSCH.FDNCLASS,FOUNDATION.EARTHINGFROM TOWERSCHLEFT outer JOIN FOUNDATIONON TOWERSCH.LOCNO=FOUNDATION.LOCNO; tvspsekhar |
|
|
raky
Aged Yak Warrior
767 Posts |
Posted - 2010-03-06 : 00:04:01
|
| try thisSELECT TOWERSCH.LOCNO,TOWERSCH.TWRTYPE,TOWERSCH.FDNCLASS,FOUNDATION.EARTHINGFROM TOWERSCHLEFT outer JOIN FOUNDATIONON TOWERSCH.LOCNO=FOUNDATION.LOCNOWHERE FOUNDATION.LOCNO IS NULLThis query will give non matching records in TOWERSCH table when compared with FOUNDATION table based on LOCNO column and using this query u will get always FOUNDATION.EARTHING column value as always null |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-06 : 01:43:07
|
quote: Originally posted by tvspsekhar Please correct the code I am attaching.SELECT TOWERSCH.LOCNO,TOWERSCH.TWRTYPE,TOWERSCH.FDNCLASS,FOUNDATION.EARTHINGFROM TOWERSCHLEFT outer JOIN FOUNDATIONON TOWERSCH.LOCNO=FOUNDATION.LOCNO; tvspsekhar
I cant see anything wrong except a small typo------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
tvspsekhar
Starting Member
20 Posts |
Posted - 2010-03-06 : 01:46:01
|
quote: Originally posted by raky try thisSELECT TOWERSCH.LOCNO,TOWERSCH.TWRTYPE,TOWERSCH.FDNCLASS,FOUNDATION.EARTHINGFROM TOWERSCHLEFT outer JOIN FOUNDATIONON TOWERSCH.LOCNO=FOUNDATION.LOCNOWHERE FOUNDATION.LOCNO IS NULLThis query will give non matching records in TOWERSCH table when compared with FOUNDATION table based on LOCNO column and using this query u will get always FOUNDATION.EARTHING column value as always null
Thank U Very Much. Now it is workingtvspsekhar |
 |
|
|
|
|
|
|
|