September 22, 2005 at 4:40 am
I'm trying to concatenate the value of 2 varchar fields in the DTS source to a single field in the destination. Example: Select Lname + ', ' + Fname as Name. I'm getting an error that the + token is invalid. It works fine in query analyzer. What am I missing?
September 22, 2005 at 6:09 am
If you are writing the code as part of an ActiveX script, the & character is used to concatenate strings, not + (just to keep you on your toes)!
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
September 22, 2005 at 10:46 am
It was in a "copy column" task. I had tried using the & character also but it failed. I think the problem might be that my source is a DB2 table and the SQL must not support concatenation with its fields. I'm not familiar with the ActiveX script, but maybe I'll look into that and see if I can get it to work that way. Thanks.
September 22, 2005 at 1:04 pm
Dan,
You could import into a "staging" table with separate name columns, then concatenate as you move the data from there to your "real" table.
Greg
Greg
September 27, 2005 at 4:10 am
Thanks Greg. That's the solution I'll use!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply