Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Common join syntax with Oracle / SQL
Message
General information
Forum:
Oracle
Category:
PL/SQL
Miscellaneous
Thread ID:
00547909
Message ID:
00547954
Views:
8
>Is there a common syntax between PL/SQL and T-SQL for joins? We are using INNER/OUTER JOINS in T-SQL and (+) syntax for PL/SQL. Our problem is that we have a back-end independent app, and maintaining separate SQL Statements for reporting is becoming overwhelming.
>
>Any comments or suggestions are greatly appreciated.

About the only way to make it independent of backend is:

select ... where joins_here and filter_conditions ... union select ... [no joins] where filter_conditions not in (first select statememt)

The point is to select the orphan records in the union where you would not be joining the tables. You would also have to add place holder fields of the same data type in the unioned select statements. This can get quite complex and a PITA. You are probabley better off checking programmatically what you are connected to, and provide both options in your code.

If you have static SQL, you could store the SQL in memo fields for each type of syntax [PLSQL field, TSQL field, etc], then use macro expansion to execute it.
Mark McCasland
Midlothian, TX USA
Previous
Reply
Map
View

Click here to load this message in the networking platform