At 21:42 +0000 8/5/02, joe speigle wrote:
>hi,
>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
>ref_no,
>name,street || city, zip,phone1, phone2,description from
>address_book.business;
>(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
>from address_book.business;
>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:
http://www.mysql.com/doc/en/INSERT_SELECT.html
>
>joe
>
>
>
>
>---------------------------------------------------------------------
>Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
>To request this thread, e-mail <mysql-thread116452@stripped>
>To unsubscribe, e-mail <mysql-unsubscribe-paul=snake.net@stripped>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
| Thread |
|---|
| • str concat | joe speigle | 6 Aug |
| • Re: str concat | Paul DuBois | 6 Aug |