Yes that was my first thought as well and I checked and it is text.

-----Original Message-----
From: Phillips, Dave [mailto:[email protected]] 
Sent: Monday, December 10, 2012 9:20 AM
To: sql
Subject: RE: Update data in a field from concatenated data


Sounds like your column type on CityStateZip is set to decimal.  If you are 
storing zip+4 as 99999-9999 then you need it set to either varchar(10) or 
char(10).  If you are storing zip+4 as 999999999 then you could set it to 
integer.  But in any case, you won't want it to be decimal.

Dave Phillips

-----Original Message-----
From: Denise Zuverink [mailto:[email protected]] 
Sent: Monday, December 10, 2012 9:13 AM
To: sql
Subject: RE: Update data in a field from concatenated data


Thanks,
I tried that and it is returning only the first five characters of the 
PostalCode and then a decimal and then 0 (19076.0).  Although this is not what 
I want I have gotten somewhere and now that I have an idea I will mess around 
with a bit more.

Thank you
Denise

-----Original Message-----
From: Raymond Thompson [mailto:[email protected]] 
Sent: Monday, December 10, 2012 8:54 AM
To: sql
Subject: RE: Update data in a field from concatenated data


In my experience you cannot do what you are trying do with that SQL. You cannot 
concatenate fields the way that you are doing. SQL updates are in the format of:

Update <database>
  Set <column> = <somevalue>,
         <column> = <someval

This may work.

Update Wawa_DB
  Set CityStateZip = City + ' ' + State + ' ' + PostalCode






~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3470
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm

Reply via email to