Re: tool: convert classic oracle sql to ansi?
Date: Thu, 18 Dec 2008 16:54:13 -0800 (PST)
On Dec 18, 6:27 pm, DA Morgan <damor..._at_psoug.org> wrote:
> steph wrote:
> > On 16 Dez., 21:56, ddf <orat..._at_msn.com> wrote:
> >> On Dec 16, 11:18 am, steph <stepha..._at_yahoo.de> wrote:
> >>> Hi Group,
> >>> I do this manually from time to time - but maybe there's a better
> >>> way ...
> >>> Does anybody know of a way, tool or whatever to convert classic oracle
> >>> sql-statements to ansi-sql and vice versa? Maybe the database is able
> >>> to do so?
> >>> Thanks,
> >>> Stephan
> >> "Classic" Oracle SQL? Hmmm ...
> >> Selecte *
> >> From Ye Olde Dual;
> >> Or are you asking for a 'tool' to 'translate' Oracle join syntax (such
> >> as outer joins) into the ANSI equivalent?
> >> I know of no such tool, but, I've been wrong before.
> >> David Fitzjarrell
> > Yes, correct: a tool to convert oracle join syntax to ansi join syntax
> > - that's what I'm looking for!
> It would take less time to write your own with perl than it has taken
> to amuse everyone here by asking the question. The vast majority of
> us, knowing Oracle, consider the ANSI joins a waste of perfectly good
> Lets see:
> SELECT *
> FROM t1,t2
> WHERE t1.col1 = t2.col2;
> Replace the comma with ' INNER JOIN ' (add ten keystrokes)
> Replace WHERE with ON (subtract three keystrokes)
> and it looks like this:
> SELECT *
> FROM t1 INNER JOIN t2
> ON t1.col1 = t2.col2;
> And that is worth your time and your employer's money?
> And one is clearer than the other?
> I'd love to hear the explanation.
> Daniel A. Morgan
> Oracle Ace Director & Instructor
> University of Washington
> damor..._at_x.washington.edu (replace x with u to respond)
> Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text -
> - Show quoted text -
I think it is clearer as it better separate joins from selection criteria and find it easier to spot missing joins which a few developers [and myself] tend to do using the old syntax with complex queries - killing dev with a cross join in the process. So for me we save time/$$ by less errors and rework. For simple queries it is a bit of a trade off.
rm Received on Thu Dec 18 2008 - 18:54:13 CST