Saturday, 31 August 2013

Selecting distinct within a select statment.

Selecting distinct within a select statment.

Hi in the following select statement I want to select the distinct values
b.bId for one of the column and not working. Statement is
select
a.sId
,distinct b.bId
from tlocal a
left outer join ts b on (b.id=a.mainId)
where
a.id=@xId;
I have to select the distinct in the select statement since this is
returning values in a stored procedure. Let me know please, thanks

No comments:

Post a Comment