Reply to Re: NULL values in a SELECT in another SELECT

Your name:

Reply:


Posted by Plamen Ratchev on 01/24/08 17:45

Just for the sake of replicating what you were trying to do, in SQL Server
2000 you can use UDF:

CREATE FUNCTION dbo.B
( @x CHAR(1) )
RETURNS CHAR
AS
BEGIN
SET @x = (SELECT y FROM Bar WHERE x = @x
UNION
SELECT y FROM Bar WHERE x = @x)
RETURN @x
END

Then you can write the query like:

SELECT x, dbo.B(x)
FROM Foo
WHERE dbo.B(x) IS NOT NULL

HTH,

Plamen Ratchev
http://www.SQLStudio.com

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация