List:General Discussion« Previous MessageNext Message »
From:Paul DuBois Date:August 6 2002 2:42am
Subject:Re: str concat
View as plain text  
At 21:42 +0000 8/5/02, joe speigle wrote:
>this is an sql question dealing with query syntax:
>here's the problem child:
>(insert into table2 values select (col_1,col_2...) from otherdb.table1):
>insert into credit_cards 
>(card_no,name,address,zip,phone1,phone2,description) values select 
>name,street || city, zip,phone1, phone2,description from 
>(I want to change the two columns in table1 (address_book) into one 
>column for insertion).
>not that this does not work:
>insert into credit_cards 
>(card_no,name,address,zip,phone1,phone2,description) values select 
>ref_no,  name,concat(street,city), zip,phone1, phone2,description 
>has anybody done this operation before?

None of your queries look like anything legal.  I suggest you study the
allowable INSERT INTO ... SELECT syntax as described in the manual:

>Before posting, please check:
>   (the manual)
>           (the list archive)
>To request this thread, e-mail <mysql-thread116452@stripped>
>To unsubscribe, e-mail <>
>Trouble unsubscribing? Try:

str concatjoe speigle6 Aug
  • Re: str concatPaul DuBois6 Aug