Welcome Guest, Not a member yet? Register   Sign In
Oracle join tables
#2

[eluser]Relexx[/eluser]
[quote author="atomp3" date="1235415931"]SELECT * FROM (select inner_query.*, rownum rnum FROM (SELECT * FROM "CCGW_LOG" JOIN "CCGW_MSG_XMLDATA" ON "LOG_ID" = "LOG_ID" ) inner_query WHERE rownum < 10)
[/quote]

Traditionally Oracle table joins are in there where clause.

Code:
select rownum, *
from (select ccgw_log.*, ccgw_msg_xmldata.*
      from ccgw_log, ccgw_msg_xmldata
      where ccgw_log.log_id = ccgw_msg_xmldata.log_id)
where rownum < 10

having said all that this like could be your problem
[quote author="atomp3" date="1235415931"]
Code:
$this->db->join('CCGW_MSG_XMLDATA', 'LOG_ID = LOG_ID');
[/quote]
which log_id is connecting to which log_id, try prefixing log_id with the table_name.


Messages In This Thread
Oracle join tables - by El Forum - 02-23-2009, 07:05 AM
Oracle join tables - by El Forum - 02-24-2009, 05:14 PM



Theme © iAndrew 2016 - Forum software by © MyBB