CONVERT(varchar(8000),col1)
Example: IP is varchar(50) and Hostname is Text
Not sure why you would ever have a need for this but this is an example that works.
SELECT id
,DATETIME
,('IP Address:' + ipaddress) AS "IP Address"
,('Hostname: ' + CONVERT(VARCHAR(8000), hostname)) AS "Hostname"
FROM pageview
More practical use
SELECT id ,DATETIME ,(ipaddress + ' | ' + CONVERT(VARCHAR(8000), hostname)) AS "IP Address" FROM pageview
Originally Posted on July 10, 2013
Last Updated on October 26, 2015
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.