Hi,
Trying this Query,
[B]DECLARE @SR VARCHAR(8),@SC CHAR(15),@ST CHAR(15),@SNO int;
SELECT * FROM (SELECT DISTINCT ROW_NUMBER() OVER (ORDER BY a.rno) AS rowid,
@SR=a.rno,@SC=a.kat,
@ST=a.type FROM SMas a,
SDet b WHERE
b.id='X' AND
a.rno=b.rno) AS C WHERE C.rowid=4
[/B]
but getting this following error:
[B][I][U]Msg 102, Level 15, State 1, Line 3
Incorrect syntax near '='. (In this area,@SR=a.rno,@SC=a.kat,
@ST=a.type)
[/U][/I][/B]
Please help me out. Thanks in advance
[/I][/B]