Showing posts with label soldtonumber. Show all posts
Showing posts with label soldtonumber. Show all posts

Tuesday, February 14, 2012

difference??

Hi,
why the first statement returns nothing, but the second one returns the
result I want?
select soldto.soldtonumber from soldto where soldto.soldtonumber not in
(Select soldto from fsosoldto)
SELECT dbo.SoldTo.SoldToNumber, dbo.FSOsoldto.Soldto
FROM dbo.SoldTo Left JOIN
dbo.FSOsoldto ON dbo.SoldTo.SoldToNumber =
dbo.FSOsoldto.Soldto where FSOsoldto.Soldto is null
Tks
Edforget about this question since soldto contains null value that's why the
first statement always returns null
"Ed" wrote:

> Hi,
> why the first statement returns nothing, but the second one returns the
> result I want?
> select soldto.soldtonumber from soldto where soldto.soldtonumber not in
> (Select soldto from fsosoldto)
>
> SELECT dbo.SoldTo.SoldToNumber, dbo.FSOsoldto.Soldto
> FROM dbo.SoldTo Left JOIN
> dbo.FSOsoldto ON dbo.SoldTo.SoldToNumber =
> dbo.FSOsoldto.Soldto where FSOsoldto.Soldto is null
> Tks
> Ed