You could try to Cast/Convert the ntext to varchar.  Might be tricky because of the 
length of the ntext field but it is worht a try.

Mario

-----Original Message-----
From: Cantrell, Adam [mailto:[EMAIL PROTECTED]
Sent: 04 June 2003 19:15
To: CF-Talk
Subject: RE: SQL concat


I've also tried:

txt_description = {fn CONCAT(txtColumnName1, '#form.txtFieldName1#')}

it gives a similar error. I guess you just can't concatenate to this data
type?

Adam.



> -----Original Message-----
> From: Cantrell, Adam [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 04, 2003 1:09 PM
> To: CF-Talk
> Subject: RE: SQL concat
> 
> 
> They're the same type of data - the column data type is 
> ntext. I've even
> tried this and still get "Invalid operator for data type. 
> Operator equals
> add, type equals ntext":
> 
> SET txtColumnName1 = Cast(txtColumnName1 AS ntext) +
> Cast('#form.txtFieldName1#' AS ntext)
> 
> Adam.
> 
> 
> 
> > -----Original Message-----
> > From: Ciliotta, Mario [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, June 04, 2003 12:26 PM
> > To: CF-Talk
> > Subject: RE: SQL concat
> > 
> > 
> > Hi,
> > 
> > In a simple select query where the datatypes are the same you 
> > can use this:
> > 
> > SELECT (au_lname + ', ' + au_fname) AS Name
> > FROM authors
> > ORDER BY au_lname ASC, au_fname ASC
> > 
> > 
> > If the datatypes are different you need to use cast:
> > 
> > SELECT 'The order date is ' + CAST(ord_date AS varchar(30)) 
> > as display_date
> > FROM sales
> > WHERE ord_num = 'A2976'
> > ORDER BY ord_num
> > 
> > 
> > You can also use Convert() instead of Cast()
> > 
> > Hope it helps,
> > Mario
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Cantrell, Adam [mailto:[EMAIL PROTECTED]
> > Sent: 04 June 2003 18:14
> > To: CF-Talk
> > Subject: SQL concat
> > 
> > 
> > What's the operator for string concatenation in SQL server - 
> > I'm trying:
> > 
> > SET txtColumnName1 = txtColumnName1 + '#form.txtFormField1#'
> > 
> > And that's throwing me an "Invalid operator for data type" error.
> > 
> > Anyone help me out right quick? Adam.
> > 
> > 
> > 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to