OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

oracle: query with multiple tables

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
la3
General User
General User


Joined: 04 Dec 2003
Posts: 5

PostPosted: Wed Dec 17, 2003 5:02 am    Post subject: oracle: query with multiple tables Reply with quote

Hi all:
Does anyone knows why in OO I only cam make sql queries inside a single table?
There is an "inner join" feature that just doesnīt work when you are using a relational db as Oracle.
There is any workaround for this?
Or why is it so?

Thanks in advance...
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Wed Dec 17, 2003 12:54 pm    Post subject: Reply with quote

Quote:
Does anyone knows why in OO I only cam make sql queries inside a single table?
OOo is limited by the database software and odbc/jdbc driver in use but in general OOo will allow you to make sql queries joining multiple tables. Exceptions to this apply to dBase, Spreadsheet and Text data sources.

Quote:
There is an "inner join" feature that just doesnīt work when you are using a relational db as Oracle.
Again, the feature is a fundamental part of the database software and not OOo. However, you may have encountered a conflict between syntax accepted by OOo parser and that acceptable to the database server. I assume that you are using an expression of the form:
(A)SELECT selectexpression FROM table_reference INNER JOIN table_reference ...
While this is legal SQL it is semantically the same as:
(B) SELECT selectexpression FROM table_reference , table_reference ...

(B) is acceptable to OOo. If you need to run queries with syntax of type (A) through OOo then select 'Run SQL command directly ' from EDIT menu.

If this is not the answer you need, more details of your specific problem would make diagnosis easier. Include version/release of software that you are experiencing problems with.
Back to top
View user's profile Send private message
la3
General User
General User


Joined: 04 Dec 2003
Posts: 5

PostPosted: Thu Dec 18, 2003 2:45 am    Post subject: oracle: query with multiple tables Reply with quote

Thanks for your answer.
My sql code is
SELECT "MVT_STK"."COD_PRO", "PRO"."LIB_PRO", "MVT_STK"."COD_UT", "MVT_STK"."QTE", "MVT_STK"."PDS_NET" FROM "DFRSYCOM"."PRO" "PRO", "DFRSYCOM"."MVT_STK" "MVT_STK" WHERE ( "PRO"."COD_PRO" = "MVT_STK"."COD_PRO" ) AND ( ( "MVT_STK"."DAT_MVT" > {D '2003-12-16' } AND "MVT_STK"."TYP_MVT" = 'ENT_P' ) )
(itīs generated from sql wizard)

and the message that follows is:
"[Microsoft][ODBC driver for Oracle] Is not possible to use an associated key group oriented cursor with distinct clause, join, intersection or subtraction or in a read-only group results" (or something like this -- itīs a try-out from an portuguese original message).
I change my login from read-only to write premissions with the same results...

Thanks again...
Back to top
View user's profile Send private message
dfrench
Moderator
Moderator


Joined: 03 Mar 2003
Posts: 1605
Location: Wellington, New Zealand

PostPosted: Thu Dec 18, 2003 11:51 am    Post subject: Reply with quote

You seem to have a problem outside openoffice ... try addressing this to Oracle experts.
Back to top
View user's profile Send private message
Guest






PostPosted: Mon Feb 09, 2004 6:48 am    Post subject: Reply with quote

dfrench wrote:
You seem to have a problem outside openoffice ... try addressing this to Oracle experts.


You seem to have a problem WITH YOU KNOWELEGE.

i have same troubles with OO misunestanding SQL that Exel eat pretti well (via MS-ODBC-Oracle as well Oracle-ODBC-8.0.5 (realy outdated) win2000/98/xp).

try addressing this to Open kids.
Back to top
Dick Kniep
Guest





PostPosted: Sun Feb 15, 2004 12:16 pm    Post subject: Oracle pain Reply with quote

Hi,

Yes it seems like a conflict in the ODBC driver.

You could off course always create a view in the database that contains the offending statement, after which you could make a simple query to the view.

Cheers
Dick
Back to top
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group