Saturday, February 06, 2010

Convert int to string in a sql Query


Make your columns' data type match to use UNION (ALL).


CAST(ItemId as VARCHAR(50)) as col1
Or
CONVERT(VARCHAR(50),ItemId) as colI1



No comments:

Post a Comment