How to use joins on Pro*C 10g?

While using inner join on Pro*C I am getting the below error:

PCC-S-02201, Encountered the symbol "inner" when expecting one of the following:

I've just used a simple inner join. When I searched for solution, I was told that 10g doesn't support these kind of syntax and I should use dynamic SQL instead. Is that true? How to achieve inner join using dynamic SQL?

Answers


ProC 10g version doesn't allow inner/outer joins. If you want to have these, you will have to upgrade your ProC compiler. If you use, 11g you can use the solution suggested here: http://forums.oracle.com/forums/thread.jspa?threadID=665519


Use the old syntax.

Instead of: SELECT * FROM TABLE1 INNER JOIN TABLE2 ON TABLE1.PK = TABLE2.FK

Use this: SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.PK = TABLE2.FK

For OUTER JOINS just use the (+) sign on the side you want to be nullable:

Instead of: SELECT * FROM TABLE1 LEFT JOIN TABLE2 ON TABLE1.PK = TABLE2.FK

Use this: SELECT * FROM TABLE1, TABLE2 WHERE TABLE1.PK = TABLE2.FK (+)


Need Your Help

One particular ImageView causing severe lag

java android imageview

One particular activity uses a gallery view and many images that are displayed when one item in the gallery view is clicked. When you scroll through the gallery, the scrolling is very smooth ONLY i...

Is there any way I can restore a DB2 backup file onto IBM DashDB?

db2 ibm-cloud dashdb

I am trying to restore a DB2 backup file into my BlueMix DashDB service. How do I go about doing this?