| View previous topic :: View next topic |
| Author |
Message |
la3 General User

Joined: 04 Dec 2003 Posts: 5
|
Posted: Wed Dec 17, 2003 5:02 am Post subject: oracle: query with multiple tables |
|
|
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 |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Wed Dec 17, 2003 12:54 pm Post subject: |
|
|
| 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 |
|
 |
la3 General User

Joined: 04 Dec 2003 Posts: 5
|
Posted: Thu Dec 18, 2003 2:45 am Post subject: oracle: query with multiple tables |
|
|
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 |
|
 |
dfrench Moderator

Joined: 03 Mar 2003 Posts: 1605 Location: Wellington, New Zealand
|
Posted: Thu Dec 18, 2003 11:51 am Post subject: |
|
|
| You seem to have a problem outside openoffice ... try addressing this to Oracle experts. |
|
| Back to top |
|
 |
Guest
|
Posted: Mon Feb 09, 2004 6:48 am Post subject: |
|
|
| 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
|
Posted: Sun Feb 15, 2004 12:16 pm Post subject: Oracle pain |
|
|
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 |
|
 |
|