RE: [PHP-WIN] Access sql question
| From: | Asendorf, John | Date: | Tue, 10 Oct 2000 13:31:32 +0000 |
| Subject: | RE: [PHP-WIN] Access sql question | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-3092@lists.php.net to get a copy of this message | ||
OK, that seemed much closer....
Warning: SQL error: [Microsoft][ODBC Microsoft Access Driver] Number of
query values and destination fields are not the same., SQL state 21S01 in
SQLPrepare in D:\InetPub\wwwroot\is\website\test_center\access\dbinsert.php
on line 53
$sql = "INSERT INTO hello
(department,telephone,address1,address2,city,state,zip,floor)
SELECT (department,telephone,address1,address2,city,state,zip,floor)
FROM hello2";
---------------------
John Asendorf - jasendorf@lcounty.com
Web Applications Developer
http://www.lcounty.com - NEW FEATURES ADDED DAILY!
Licking County, Ohio, USA
740-349-3631
> -----Original Message-----
> From: Andrian Pervazov [mailto:apervazov@aspen-marketing.com]
> Sent: Tuesday, October 10, 2000 8:56 AM
> To: alain@samoun.com
> Cc: Php-Windows@Lists. Php. Net (E-mail)
> Subject: Re: [PHP-WIN] Access sql question
>
>
> It should be "insert into table2 (field1,field2) select
> (field1n,field2n) from table1
>
> At least that's how it is on SQL Server
>
> Andrian
>
> alain samoun wrote:
> >
> > Slightly OT:
> > I'm not too familiar with Access db, can I do something like:
> > $sql = "insert into table2 (field1,field2) values( select
> (field1n,field2n)
> > from table1)";
> > where the corresponding fields have the same type.
> > Message from Alain Samoun
> > alain@samoun.com
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> > For additional commands, e-mail: php-windows-help@lists.php.net
> > To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>