Sunday, February 19, 2012

Append string to field value in select list

How can I append a string to the field value in the select list
SELECT Code + '-20' FROM tb....
I want to the above to return 2000-20 for example.
How can I do this?
Mike BJust like you did if Code is a character-based datatype. If not, - then CAST(Code as varchar(10)) + '-20'

No comments:

Post a Comment