aleniko Posted September 16, 2012 Share Posted September 16, 2012 Hi all; I have the following statement to create a temporary table: mysql_query("create temporary table curdist1 select acct,name,address1,address2,krccust.city,krccust.state,krccust.zip,krccust.tel,zips.lat,zips.lon,termtype,web,shpadrs1,shpadrs2,shpcity,shpstate,shpzip from krccust left join zips on left(krccust.zip,6)=zips.zip") ;^M After the table is created, I need to go through it and change every record which has the phrase "P.O." in the name field. I need to replace the information in the name,address1,address2,city,state,zip with the corresponding shpname,shpadrs1,shpadrs2,shpcity,shpstate,shpzip for all the records which have "P.O" in the name field. Can someone let me know what's the syntax for that? Also, I would like to know if this is achievable withing the original select statement. Thanks! Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 16, 2012 Share Posted September 16, 2012 http://dev.mysql.com/doc/refman/5.0/en/update.html Quote Link to comment Share on other sites More sharing options...
aleniko Posted September 16, 2012 Author Share Posted September 16, 2012 Sorry - What are code tags? Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 16, 2012 Share Posted September 16, 2012 On this forum you can post your code in special tags so it formats correctly. That is part of my signature however and wasn't to you directly. *SMH* Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.