954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

question

HOW can append two different datatype coulmn in singal column?

preeti anand
Newbie Poster
6 posts since Feb 2012
Reputation Points: 10
Solved Threads: 0
 

Hello,

You are looking for the cast and convert commands. For example:

SELECT TextID AS ID
FROM W1
UNION
SELECT CAST(NumericID As VARCHAR(20)) AS ID
FROM W2

Or, if you like CONVERT():

CONVERT(VARCHAR(20), NumericID)
rch1231
Posting Shark
959 posts since Sep 2009
Reputation Points: 119
Solved Threads: 142
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You