satinsilhouette
Instructor
- Feb 21, 2006
- 625
Hi,
I posted yesterday and got some help from SantaMufasa. Thank you again.
Today I trying to write an inline view in Oracle, which the syntax I will give here generally works fine in SQL or as a T-SQL statement sent through CR XI.
It isn't working here.
What I need is to pull the three fields from the inline view and show them in the main query so they show up like fields. I have looked online for some help but the syntax I attempted to use didn't work. It seems to be lacking something. It will error out on the additional fields pulling up from the inline view.
Any suggestions as to why this normal query will work in SQL and not in Oracle I would greatly appreciate.
Here's the code sample:
SELECT table1.AGING_DATE,
table2.ACCT_CLASS_id,
table6.NAME,
table2.table2_id,
table2.name,
table2.in_date_time,
table2.out_date_time,
table2.tot_acct_bal,
table2.num_of_stmts_sent,
table2.frst_det_bill_date,
table3.client_ID,
table3.client_NAME,
table.FC_NAME,
table4.client_ID,
table1.table2_ID,
table1.AMOUNT,
Inlineview.Post_Date,
Inlineview.LPAmount,
Inlineview.TXID
FROM (((((table1 table1
LEFT OUTER JOIN table4 table4 ON table1.BUCKET_ID=table4.BUCKET_ID)
LEFT OUTER JOIN table2 table2 ON table1.table2_ID=table2.table2_ID)
LEFT OUTER JOIN table3 table3 ON table4.client_ID=table3.client_ID)
LEFT OUTER JOIN table table ON table3.FC=table.FC)
LEFT OUTER JOIN table7 table6 ON table2.ACCT_id=table6.ACCT_id)
LEFT OUTER JOIN
(select max(table8.post_date)as "Post_Date",table8.amount as"LPAmount", table8.table2_id as "TXID"
from table8
where table8.tx_type = 2
Group By table8.tx_post_date,table8.amount,table8.table2_id
) InlineView
where
InlineView.TXID = table2.table2_ID
Thanks!
I posted yesterday and got some help from SantaMufasa. Thank you again.
Today I trying to write an inline view in Oracle, which the syntax I will give here generally works fine in SQL or as a T-SQL statement sent through CR XI.
It isn't working here.
What I need is to pull the three fields from the inline view and show them in the main query so they show up like fields. I have looked online for some help but the syntax I attempted to use didn't work. It seems to be lacking something. It will error out on the additional fields pulling up from the inline view.
Any suggestions as to why this normal query will work in SQL and not in Oracle I would greatly appreciate.
Here's the code sample:
SELECT table1.AGING_DATE,
table2.ACCT_CLASS_id,
table6.NAME,
table2.table2_id,
table2.name,
table2.in_date_time,
table2.out_date_time,
table2.tot_acct_bal,
table2.num_of_stmts_sent,
table2.frst_det_bill_date,
table3.client_ID,
table3.client_NAME,
table.FC_NAME,
table4.client_ID,
table1.table2_ID,
table1.AMOUNT,
Inlineview.Post_Date,
Inlineview.LPAmount,
Inlineview.TXID
FROM (((((table1 table1
LEFT OUTER JOIN table4 table4 ON table1.BUCKET_ID=table4.BUCKET_ID)
LEFT OUTER JOIN table2 table2 ON table1.table2_ID=table2.table2_ID)
LEFT OUTER JOIN table3 table3 ON table4.client_ID=table3.client_ID)
LEFT OUTER JOIN table table ON table3.FC=table.FC)
LEFT OUTER JOIN table7 table6 ON table2.ACCT_id=table6.ACCT_id)
LEFT OUTER JOIN
(select max(table8.post_date)as "Post_Date",table8.amount as"LPAmount", table8.table2_id as "TXID"
from table8
where table8.tx_type = 2
Group By table8.tx_post_date,table8.amount,table8.table2_id
) InlineView
where
InlineView.TXID = table2.table2_ID
Thanks!