ORACLE SQL PROBLEM

dBase, Calc, CSV, MS ACCESS, MySQL, PostgrSQL, OTHER
Post Reply
StevenAHeithoff
Posts: 5
Joined: Mon Feb 11, 2008 11:26 pm

ORACLE SQL PROBLEM

Post by StevenAHeithoff »

I get the following error when I exec
ResultSet = Statement.executeQuery (StatementSQL)
With StatementSQL equaling
SELECT * from table (cwms.ghk_test.retrieve_ts ( 'ft', 'NWD', 'FTPK-Fort Peck Dam-Missouri.Elev.Inst.1Hour.0.mrrppcs-rev', TO_DATE ('11Feb2008 00:00', 'DDMONYYYY HH24:MI'), TO_DATE ('11Feb2008 00:00', 'DDMONYYYY HH24:MI'), 'America/Regina'))

Note: For somereason it works fine inside the my toad software. Also other sqlstatements work so doesn't seem to be the connection.
Does anyone know if you have to give custom packages additional privilages in oracle to get them to work in STAROFFICE basic?
Image


Running on Windows XP and Oracle 10.2.3, using ODBC connection.
User avatar
Villeroy
Volunteer
Posts: 31281
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: ORACLE SQL PROBLEM

Post by Villeroy »

Does the query work with the sql-editor in direct mode (Menu:Edit>Execute directly)?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
StevenAHeithoff
Posts: 5
Joined: Mon Feb 11, 2008 11:26 pm

Re: ORACLE SQL PROBLEM

Post by StevenAHeithoff »

Opening up the database connection and exec directly it gives this error which is not very helpfull for me?
Image

Also, I forgot to say that I'm executing this in Staroffice Calc Marco.
User avatar
Villeroy
Volunteer
Posts: 31281
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: ORACLE SQL PROBLEM

Post by Villeroy »

Sorry, I'm not familiar with that kind of stuff. Possibly it is a problem with your jdbc or odbc driver.

Code: Select all

SELECT * from table (
cwms.ghk_test.retrieve_ts (
 'ft',
 'NWD',
 'FTPK-Fort Peck Dam-Missouri.Elev.Inst.1Hour.0.mrrppcs-rev',
 TO_DATE ('11Feb2008 00:00', 'DDMONYYYY HH24:MI'),
 TO_DATE ('11Feb2008 00:00', 'DDMONYYYY HH24:MI'),
 'America/Regina'
))
Does this select all fields from a table that is retrieved from a function cwms.ghk_test.retrieve_ts ?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
StevenAHeithoff
Posts: 5
Joined: Mon Feb 11, 2008 11:26 pm

Re: ORACLE SQL PROBLEM

Post by StevenAHeithoff »

Well yes it returns three fields from a table in a ref cursor?
User avatar
Villeroy
Volunteer
Posts: 31281
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: ORACLE SQL PROBLEM

Post by Villeroy »

The error message "parse error ..." with title "StarOffice Base" puzzles me since StarOffice is not supposed to parse anything in direct mode. In direct mode the query string should be passed over to the driver.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
StevenAHeithoff
Posts: 5
Joined: Mon Feb 11, 2008 11:26 pm

Re: ORACLE SQL PROBLEM

Post by StevenAHeithoff »

Sorry, I'm new to Star office I think I executed wrong. The error is from when it execute not directly.

This one happens when I have the execute directly checked.
Image


Though it doesn't make much since to me since from the same connection. This sql statement works which to me means the connection is ok? My only question is does ODBC/StarOffice not support ref cursors?
Image
User avatar
Villeroy
Volunteer
Posts: 31281
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: ORACLE SQL PROBLEM

Post by Villeroy »

I *believe* your driver is the delinquent. The "More" button of that error message uses to be quite verbose.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
StevenAHeithoff
Posts: 5
Joined: Mon Feb 11, 2008 11:26 pm

Re: ORACLE SQL PROBLEM

Post by StevenAHeithoff »

The More button contains This? Which was not every informative to me?

SQL Status: œ=ü
Error code: 1677194709
User avatar
Villeroy
Volunteer
Posts: 31281
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: ORACLE SQL PROBLEM

Post by Villeroy »

Aaaah, yes ... 1677194709 is my phone number actually.

I'm clueless. Nevertheless I would contact the creators of the (odbc?) database driver you are utilizing for the connection. May be the driver can not handle that complex queries (FROM derived from function call).
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply