Multiple joins in Oracle? 
Author Message
 Multiple joins in Oracle?

Hi.

I have a little problem. I have a select that joins three tables and
this doesn't work e.g. recordcount returns -1. If I throw away one table
and just join two table everything seems to work. Is this a known
limitation of the Oracle driver or do I have to write a special select
for Delphi?
BTW: The select works correctly from SQLplus.

Any helps is appreciated...

Regards,

BTJ

--
__________________________________________________________________________
Bj?rn T Johansen (BSc,MNIF)            Dept. of Customized Solutions
Senior Systems Engineer                 Software Innovation as

Phone   : +47 22 51 86 47               P.O.Box 390 Sk?yen
Fax     : +47 22 73 07 14               N-0212 Oslo, Norway
Cellular: +47 926 93 298                 http://www.*-*-*.com/
___________________________________________________________________________
"The stickers on the side of the box said "Supported Platforms: Windows
95,
Windows NT 4.0, or better", so clearly Linux was a supported platform."



Wed, 18 Jun 1902 08:00:00 GMT  
 Multiple joins in Oracle?

Hi,

there isn't any limitation on the Oracle driver for a maximum number of
joins. We use queries with up to ten joined tables and it works fine. So
please mail the statement and the properties of the TQuery component, to
see what's going wrong.

Bye
Thomas

Quote:

> Hi.

> I have a little problem. I have a select that joins three tables and
> this doesn't work e.g. recordcount returns -1. If I throw away one
> table
> and just join two table everything seems to work. Is this a known
> limitation of the Oracle driver or do I have to write a special select

> for Delphi?
> BTW: The select works correctly from SQLplus.

> Any helps is appreciated...

> Regards,

> BTJ

> --
> __
> _______________________________________________________________________

> Bj?rn T Johansen (BSc,MNIF)             Dept. of Customized Solutions
> Senior Systems Engineer                 Software Innovation as

> Phone   : +47 22 51 86 47               P.O.Box 390 Sk?yen
> Fax     : +47 22 73 07 14               N-0212 Oslo, Norway
> Cellular: +47 926 93 298                http://www.softinn.no

> __________________________________________________________________________

> "The stickers on the side of the box said "Supported Platforms:
> Windows
> 95,
> Windows NT 4.0, or better", so clearly Linux was a supported
> platform."

  vcard.vcf
< 1K Download


Wed, 18 Jun 1902 08:00:00 GMT  
 Multiple joins in Oracle?

I have attached some more information coming from the SQL-monitor. Hope
this gives you an idea... (The first select works but not the second...)

2       13:58:36  SQL Prepare: ORACLE - select * from sensors s,
unit_specification u where s.unit_id=u.unit_id and u.unit_id =0

3       13:58:36  SQL Transact: ORACLE - Set autocommit on/off
4       13:58:36  SQL Execute: ORACLE - select * from sensors s,
unit_specification u where s.unit_id=u.unit_id and u.unit_id =0

5       13:58:36  SQL Misc: ORACLE - Set rowset size
6       13:58:36  SQL Stmt: ORACLE - Fetch
7       13:58:36  SQL Stmt: ORACLE - EOF
8       13:58:36  SQL Data Out: ORACLE - Column = 1, Name = SENSOR_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
9       13:58:36  SQL Data Out: ORACLE - Column = 2, Name =
PARENT_SENSOR_ID, Type = fldFLOAT, Precision = 0, Scale = 0, Data = NULL
10      13:58:36  SQL Data Out: ORACLE - Column = 3, Name = UNIT_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
11      13:58:36  SQL Data Out: ORACLE - Column = 4, Name =
SAMPLING_INTERVAL, Type = fldTIMESTAMP, Precision = 1, Scale = 0, Data =
4/1/1998 0:0:5:0
12      13:58:36  SQL Data Out: ORACLE - Column = 5, Name =
TIMEOUT_PERIOD, Type = fldTIMESTAMP, Precision = 1, Scale = 0, Data =
4/1/1998 0:1:0:0
13      13:58:36  SQL Data Out: ORACLE - Column = 6, Name = VIEW_NAME,
Type = fldZSTRING, Precision = 50, Scale = 0, Data = Testing
14      13:58:36  SQL Data Out: ORACLE - Column = 7, Name = UNIT_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
15      13:58:36  SQL Data Out: ORACLE - Column = 8, Name =
UNIT_CODE_ID, Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
16      13:58:36  SQL Data Out: ORACLE - Column = 9, Name = LOCATION_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
17      13:58:36  SQL Data Out: ORACLE - Column = 10, Name = SITE_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
18      13:58:36  SQL Data Out: ORACLE - Column = 11, Name = ENABLED,
Type = fldFLOAT, Precision = 38, Scale = 0, Data = 1.000000
19      13:58:36  SQL Stmt: ORACLE - Reset
20      13:58:36  SQL Stmt: ORACLE - Close
21      13:58:36  SQL Prepare: ORACLE - select * from sensors s,
unit_specification u, location l where s.unit_id=u.unit_id and
u.location_id =l.location_id and u.unit_id =0

22      13:58:36  SQL Execute: ORACLE - select * from sensors s,
unit_specification u, location l where s.unit_id=u.unit_id and
u.location_id =l.location_id and u.unit_id =0

23      13:58:36  SQL Blob IO: ORACLE - Return blob data
24      13:58:36  SQL Stmt: ORACLE - Fetch
25      13:58:36  SQL Data Out: ORACLE - Column = 1, Name = SENSOR_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
26      13:58:36  SQL Data Out: ORACLE - Column = 2, Name =
PARENT_SENSOR_ID, Type = fldFLOAT, Precision = 0, Scale = 0, Data = NULL
27      13:58:36  SQL Data Out: ORACLE - Column = 3, Name = UNIT_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
28      13:58:36  SQL Data Out: ORACLE - Column = 4, Name =
SAMPLING_INTERVAL, Type = fldTIMESTAMP, Precision = 1, Scale = 0, Data =
4/1/1998 0:0:5:0
29      13:58:36  SQL Data Out: ORACLE - Column = 5, Name =
TIMEOUT_PERIOD, Type = fldTIMESTAMP, Precision = 1, Scale = 0, Data =
4/1/1998 0:1:0:0
30      13:58:36  SQL Data Out: ORACLE - Column = 6, Name = VIEW_NAME,
Type = fldZSTRING, Precision = 50, Scale = 0, Data = Testing
31      13:58:36  SQL Data Out: ORACLE - Column = 7, Name = UNIT_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
32      13:58:36  SQL Data Out: ORACLE - Column = 8, Name =
UNIT_CODE_ID, Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
33      13:58:36  SQL Data Out: ORACLE - Column = 9, Name = LOCATION_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
34      13:58:36  SQL Data Out: ORACLE - Column = 10, Name = SITE_ID,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
35      13:58:36  SQL Data Out: ORACLE - Column = 11, Name = ENABLED,
Type = fldFLOAT, Precision = 38, Scale = 0, Data = 1.000000
36      13:58:36  SQL Data Out: ORACLE - Column = 12, Name =
LOCATION_ID, Type = fldFLOAT, Precision = 0, Scale = 0, Data = 0.000000
37      13:58:36  SQL Data Out: ORACLE - Column = 13, Name =
LOCATION_NAME, Type = fldZSTRING, Precision = 100, Scale = 0, Data =
Sk?yen
38      13:58:36  SQL Data Out: ORACLE - Column = 14, Name = HEIGHT,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 10.000000
39      13:58:36  SQL Data Out: ORACLE - Column = 15, Name = DIRECTION,
Type = fldFLOAT, Precision = 0, Scale = 0, Data = 100.000000
40      14:04:32  Log started for: Mirsip16

Quote:

> Hi,

> there isn't any limitation on the Oracle driver for a maximum number of
> joins. We use queries with up to ten joined tables and it works fine. So
> please mail the statement and the properties of the TQuery component, to
> see what's going wrong.

> Bye
> Thomas


> > Hi.

> > I have a little problem. I have a select that joins three tables and
> > this doesn't work e.g. recordcount returns -1. If I throw away one
> > table
> > and just join two table everything seems to work. Is this a known
> > limitation of the Oracle driver or do I have to write a special select

> > for Delphi?
> > BTW: The select works correctly from SQLplus.

> > Any helps is appreciated...

> > Regards,

> > BTJ

> > --
> > __
> > _______________________________________________________________________

> > Bj?rn T Johansen (BSc,MNIF)             Dept. of Customized Solutions
> > Senior Systems Engineer                 Software Innovation as

> > Phone   : +47 22 51 86 47               P.O.Box 390 Sk?yen
> > Fax     : +47 22 73 07 14               N-0212 Oslo, Norway
> > Cellular: +47 926 93 298                http://www.softinn.no

> > __________________________________________________________________________

> > "The stickers on the side of the box said "Supported Platforms:
> > Windows
> > 95,
> > Windows NT 4.0, or better", so clearly Linux was a supported
> > platform."

>   ------------------------------------------------------------------------


>   Softwareentwicklung Sommerfeld

>   Thomas Sommerfeld

>   Im Stenglenz 12a                Work: +49 7803 980914
>   Berghaupten                     Fax: +49 7803 980916
>   77791                           Netscape Conference Address
>   Deutschland                     Netscape Conference DLS Server
>   Additional Information:
>   Last Name   Sommerfeld
>   First Name  Thomas

--
__________________________________________________________________________
Bj?rn T Johansen (BSc,MNIF)            Dept. of Customized Solutions
Senior Systems Engineer                 Software Innovation as

Phone   : +47 22 51 86 47               P.O.Box 390 Sk?yen
Fax     : +47 22 73 07 14               N-0212 Oslo, Norway
Cellular: +47 926 93 298                http://www.softinn.no
___________________________________________________________________________
"The stickers on the side of the box said "Supported Platforms: Windows
95,
Windows NT 4.0, or better", so clearly Linux was a supported platform."


Wed, 18 Jun 1902 08:00:00 GMT  
 Multiple joins in Oracle?

Sorry, my fault entirely. The problem was the RecordCount property. It
seems that it's supposed to return -1...

Regards,

BTJ



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Joining multiple records

2. Access ODBC and multiple joins

3. Interbase SQL multiple left joins: not working?!

4. Join Multiple Databases' table using TQuery

5. Multiple table outer joins in Interbase

6. D1, Oracle 7.2, Live Links, and joins problem

7. Oracle - Multiple apps sharing 1 database connection

8. Multiple Oracle Connections

9. Oracle and TTable SetRange Multiple records found !

10. Delphi aand Multiple ORACLE Databases

11. SQL: Left Outer Join, Multiple tables? What the..

12. Delphi and Personal Oracle / Oracle Lite

 

 
Powered by phpBB® Forum Software