|
Posted by Helmut Woess on 10/01/29 11:50
Am 6 Jun 2006 08:02:01 -0700 schrieb Jeremy:
....
> I have also tried the following which does not provide an error but i
> cannot find a way only to return one record from the second query
Without looking at the rest of your query only a hint for getting only one
record (works only for SQL2000 and higher):
select col1, col2, ... from table where ...
union
select * from
(select top 1 col1, col2, col3, ... from table where .... order by col1,
....) as X
.... and you get only the first record from the second part.
bye, Helmut
[Back to original message]
|