Need help with select string
Posted in 2000
Hey, I just created two temporary tables "q1" and "q2" for the user "straco" with "SELECT .. INTO TEMP" Now I am trying to send the following statement through JDBC but I always receive SYNTAX ERROR messages: SELECT ( straco.q1.preis - straco.q2.preis ) / 100 AS Diff, Sum ( straco.q1.Sales ) AS Sales1, Sum ( straco.q2.Sales ) AS Sales2, Count ( straco.q1.preis - straco.q2.preis ) AS observations, Sales1 + Sales2 AS TotalSales, Sales1 / TotalSales AS Share1, Sales2 / TotalSales AS Share2 FROM straco.q1 INNER JOIN straco.q2 ON ( straco.q1.vksnr_nr = straco.q2.vksnr_nr ) AND ( straco.q1.woche_nr = straco.q2.woche_nr ) GROUP BY ( straco.q1.preis - straco.q2.preis ) / 100 ORDER BY Diff DESC Can anybody help??? Oliver Sent via Deja.com http://www.deja.com/ Before you buy.