[Zope] SQL prob on SAPDB

Vitor Varalonga vpedrosa@ciberbit.pt
Tue, 10 Sep 2002 16:08:46 +0100


--------------AF1C2193CC8CD961A543C8B4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

    Hi!


    I need to copy the data from one table to another, on my SAPDB
database. If I where working with a SQL Server DB I would run the
following query:

INSERT INTO TableB (fieldB1, fieldB2)
SELECT fieldA1, fieldA2 FROM TableA ORDER BY fieldA1

But it seems that it doesn't work on SAPD, since it returned me
the following error message:


Database error occured:

Native error: -5015
Text:  [SAP AG][SQLOD32 DLL][SAP DB]Syntax error or access
violation;-5015 POS(191) Missing
keyword:GROUP,OR,MOD,HAVING,DIV,AND,UPDATE,UNION,REJECT,INTER.


Sorry for the somehow off-topic non-zope question, but I would really
appreciate if someone could please enlighten on this.


kind regards,

Vitor Varalonga

--------------AF1C2193CC8CD961A543C8B4
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<tt>&nbsp;&nbsp;&nbsp; Hi!</tt>
<br><tt></tt>&nbsp;<tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp; I need to copy the data from one table to another,
on my SAPDB</tt>
<br><tt>database. If I where working with a SQL Server DB I would run the</tt>
<br><tt>following query:</tt><tt></tt>
<p><tt>INSERT INTO TableB (fieldB1, fieldB2)</tt>
<br><tt>SELECT fieldA1, fieldA2 FROM TableA ORDER BY fieldA1</tt><tt></tt>
<p><tt>But it seems that it doesn't work on SAPD, since it returned me</tt>
<br><tt>the following error message:</tt>
<br><tt></tt>&nbsp;<tt></tt>
<p><tt>Database error occured:</tt><tt></tt>
<p><tt>Native error: -5015</tt>
<br><tt>Text:&nbsp; [SAP AG][SQLOD32 DLL][SAP DB]Syntax error or access
violation;-5015 POS(191) Missing keyword:GROUP,OR,MOD,HAVING,DIV,AND,UPDATE,UNION,REJECT,INTER.</tt>
<br><tt></tt>&nbsp;<tt></tt>
<p><tt>Sorry for the somehow off-topic non-zope question, but I would really</tt>
<br><tt>appreciate if someone could please enlighten on this.</tt>
<br><tt></tt>&nbsp;<tt></tt>
<p><tt>kind regards,</tt><tt></tt>
<p><tt>Vitor Varalonga</tt></html>

--------------AF1C2193CC8CD961A543C8B4--