Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

concatenate text

Status
Not open for further replies.

simma

Programmer
Sep 11, 2001
398
US
Hello,
i know theres no way we can concatenate text.I am going through some problem and hope somebody can advice me on this.
I have a text field where theres large amount of text.
I need to concatenate this data to other field which is nvarchar for reporting purposes. I dont see anyway..Anything I try to do, i get back an error which says text field is not valid for this function etc etc.I even tried to parse text but it says left , right function is not valid for text
Please advice
 
Code:
declare @text1 varchar (20), @text2 nvarchar (30),@result varchar (50)
set @text1 = 'This is how you '
set @text2 = 'concatenate fields'
set @result = @text1+@text2
print @result

--in a table

select field1+' '+field2
From mytable

[bandito] [blue]DBomrrsm[/blue] [bandito]

[blue]Software code, like laws and sausages, should never be examined in production[/blue][black] - [/black][purple]Edward Tenner[/purple]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top