Thursday, June 18, 2009

Get Multi row in Single Coloum using SQL Query & Check 2 value in same colume

Get Multi Row Seat Name in single colum:

(select (select TD.V_SeatName as col1 FROM Transaction T where TD.N_TransactionID=T.N_TransactionID
for xml raw, elements, type).query('for $col1 in (row/col1) return concat($col1, ",")')) as SeatName


Check 2 value in same colume:(Get Status for (1 or 4))

select * from testtable where N_Status in(1,4)

No comments: