Are you getting any errors?What is the number of rows affected listed as? Do 
you have a where clause? that is not being shown? George
 > To: sql@houseoffusion.com
> Subject: RE: Update data in a field from concatenated data
> Date: Mon, 10 Dec 2012 10:05:22 -0600
> From: dave.phill...@verizonwireless.com
> 
> 
> Another option:
> 
> Update wawa_db
> Set CityStateZip = ifNull(City,'') || ' ' || ifNull(State,'') || ' ' || 
> ifnull(PostalCode,'')
> 
> 
> 
> -----Original Message-----
> From: Phillips, Dave [mailto:dave.phill...@verizonwireless.com] 
> Sent: Monday, December 10, 2012 11:03 AM
> To: sql
> Subject: RE: Update data in a field from concatenated data
> 
> 
> Did you try this:
> 
> Update wawa_db
> Set CityStateZip = (City || ' ' || State || ' ' || PostalCode)
> 
> With the parentheses?
> 
> -----Original Message-----
> From: Denise Zuverink [mailto:dzuver...@print-art.net] 
> Sent: Monday, December 10, 2012 11:00 AM
> To: sql
> Subject: RE: Update data in a field from concatenated data
> 
> 
> Yes that is what my code originally started with and that returned a query 
> with the data exactly like I needed it but I could not get the update command 
> to update the database.
> 
> 
> -----Original Message-----
> From: Phillips, Dave [mailto:dave.phill...@verizonwireless.com] 
> Sent: Monday, December 10, 2012 10:58 AM
> To: sql
> Subject: RE: Update data in a field from concatenated data
> 
> 
> For SQLite, the concatenation operator is || according to this page:
> 
> http://www.sqlite.org/lang_expr.html
> 
> So, if that's the case, what happens when you run this:
> 
> Update wawa_db
> Set CityStateZip = City || ' ' || State || ' ' || PostalCode
> 
> 
> If that doesn't work, do this and see what the data looks like (and post a 
> sampling):
> 
> Select top 5 city,state,postalcode from wawa_db
> 
> 
> -----Original Message-----
> From: Denise Zuverink [mailto:dzuver...@print-art.net] 
> Sent: Monday, December 10, 2012 10:42 AM
> To: sql
> Subject: RE: Update data in a field from concatenated data
> 
> 
> SQLite for now, we are in the process of converting to SQL Server but this is 
> all I have to go with at the moment.
> 
> -----Original Message-----
> From: Phillips, Dave [mailto:dave.phill...@verizonwireless.com] 
> Sent: Monday, December 10, 2012 10:31 AM
> To: sql
> Subject: RE: Update data in a field from concatenated data
> 
> 
> All column types are 'text' ?? is that the actual column type?   Are you 
> using SQL Server?  If not, what database?
> 
> -----Original Message-----
> From: Denise Zuverink [mailto:dzuver...@print-art.net] 
> Sent: Monday, December 10, 2012 10:27 AM
> To: sql
> Subject: RE: Update data in a field from concatenated data
> 
> 
> OK, I will keep trying.  Something so simple seems to be making me insane 
> because I can't work it out.  I do appreciate all that you have helped me 
> with.
> 
> Thanks
> Denise
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:3501
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm

Reply via email to