I am trying to join two tables from different Oracle schemas using a subquery. I can extract data from each of the tables without a problem. The format of the code is copied from a SQL programming manual. When I try to run the application I get the Oracle error
'ORA-00936: missing expression'. Since each SELECT statement executes on its own without error I don't understand what is missing. The query is as follows:
CODE
sql = "SELECT [DD_12809].[PDTABLE_12_1].LINE_ID FROM [DD_12809].[PDTABLE_12_1] JOIN " _
+ "(SELECT [RA_12809].[PDTABLE_201].MAT_DESCRIPTION " _
+ "FROM [RA_12809].[PDTABLE_201]) AS FAB " _
+ "ON [DD_12809].[PDTABLE_12_1].PIPING_MATER_CLASS = FAB.PIPING_MATER_CLASS"
I also tried executing the query using a straight JOIN on the two tables but got the same results. Any insight would be helpful. Thanks!
MRHooker2u