what was the error?


                                                                                       
                                      
                    "dwalker"                                                          
                                      
                    <dwalker@healthyproduct       To:     <[EMAIL PROTECTED]>, 
"'professional php'"                   
                    splus.com>                     <[EMAIL PROTECTED]>, 
<[EMAIL PROTECTED]>,                           
                                                   <[EMAIL PROTECTED]>         
                                      
                    10/19/2002 08:32 PM           cc:                                  
                                      
                    Please respond to             Subject:     Re: [PHP-DB] MySQL 
Insert Select statement                    
                    "dwalker"                                                          
                                      
                                                                                       
                                      
                                                                                       
                                      




For some reason the Insert Select statement returned an ERROR and I had to
resort to

INSERT INTO Products
(ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName)

SELECT *

FROM kalproduct ;

Is there a noticeable reason why:

INSERT INTO Products
(ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName)

SELECT(kalproduct.Product, kalproduct.size, kalproduct.SRP,
kalproduct.Cat, kalproduct.manname)

FROM kalproduct ;

would have returned an error message??  I don't want to have to create
multiple tables for the purpose of inserting into others.

-----Original Message-----
From: John W. Holmes <[EMAIL PROTECTED]>
To: 'dwalker' <[EMAIL PROTECTED]>; 'professional php'
<[EMAIL PROTECTED]>; [EMAIL PROTECTED] <[EMAIL PROTECTED]>;
[EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Saturday, October 19, 2002 7:24 PM
Subject: RE: [PHP-DB] MySQL Insert Select statement


>That's how you do it. Hopefully you've figured it out already.
>
>
>
>---John Holmes.
>
>
>
>-----Original Message-----
>From: dwalker [mailto:dwalker@;healthyproductsplus.com]
>Sent: Saturday, October 19, 2002 7:51 PM
>To: professional php; [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject: [PHP-DB] MySQL Insert Select statement
>
>
>
>While reading the MySQL manual for INSERT SELECT, I was not able to
>determine how to include all 5 fields of one table into another table
>(containing 100 fields) into SPECIFIC data fields.  Do I need to
>explicitly list all the fields within the table of 5 fields?  If so,
>would the statement be:
>
>
>
>INSERT INTO Products
>(ProductName,Size,SuggestedRetailPrice,ProductCategory,ManufacturerName)
>
>SELECT(kalproduct.Product, kalproduct.size, kalproduct.SRP,
>kalproduct.Cat, kalproduct.manname)
>
>FROM kalproduct
>
>;
>
>
>
>
>
>
>
>Thanking you in advance.
>
>
>
>P.S.  I'd give it a try, but I'm trying to move 500 partial records into
>a table containing at least 2000 records -- didn't want to start from
>scratch.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>This email message and all attachments transmitted herewith are trade
>secret and/or confidential information intended only for the
> viewing and use of addressee.  If the reader of this message
> is not the intended recipient, you are hereby notified that
>any review, use, communication, dissemination, distribution
>or copying of this communication is prohibited.  If you have
>received this communication is error, please notify the sender
>immediately by telephone or electronic mail, and delete this
>message and all copies and backups thereof.
>
>
>
>Thank you for your cooperation.
>
>


--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to