Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Error in Oracle

Author  Topic 

Raam_B
Starting Member

1 Post

Posted - 2006-01-10 : 00:04:59
Hi
I get back a SQL error (SQL Statement not properly ended) in the case of Oracle for the following query. Is it not possible to create virtual tables in Oracle. I work on Oracle 9i

CREATE GLOBAL TEMPORARY TABLE derTbl2143679361 (DerCol0, DerCol1, DerCol2, MemberCol0, OrdCol1) ON COMMIT PRESERVE ROWS AS
SELECT TBC.SUPPLIER.COUNTYID, 'AMOUNT', SUM(AMOUNT)
, TBC.SUPPLIER.COUNTRY
, TBC.SUPPLIER.COUNTYID
FROM (TBC.SUPPLIER join TBC.SALES on (TBC.SALES.SUPPLIERID = TBC.SUPPLIER.SUPPLIERID))
GROUP BY TBC.SUPPLIER.COUNTYID,TBC.SUPPLIER.COUNTRY
/*The above query works fine*/



SELECT NETEMP5.Member0, 'AMOUNT', derTbl214367936.DerCol2
, NETEMP5.Ord1
FROM (SELECT DISTINCT COALESCE(derTbl2143679361.DerCol0, -2147483647), COALESCE(derTbl2143679361.MemberCol0, '$U$6$N$9$'), COALESCE(derTbl2143679361.OrdCol1, -2147483647) FROM derTbl2143679361) NETEMP5(KeyCol0,Member0,Ord1)
left outer join derTbl2143679361 on ((COALESCE(NETEMP5.KeyCol0, -2147483647) = COALESCE(derTbl2143679361.DerCol0, -2147483647)))
GROUP BY NETEMP5.Member0,derTbl2143679361.DerCol2, NETEMP5.Ord1
ORDER BY 4
/*This query throws the error*/

Thanks

Merkin
Funky Drop Bear Fearing SQL Dude!

4970 Posts

Posted - 2006-01-10 : 00:20:36
You might be better off asking in an Oracle forum. This is an MS SQL Server site.


Damian
"A foolish consistency is the hobgoblin of little minds." - Emerson
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-01-10 : 01:53:43
Post at
www.DBForums.com
www.lazydba.com


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -