Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL statement ...

Re: SQL statement ...

From: Michael J. Ort <michael_ort_at_my-deja.com>
Date: 2000/04/08
Message-ID: <8cnog9$p5h$1@nnrp1.deja.com>#1/1

Just something I've come up with over time, 'borrowing' this and that from other people. Makes it really easy to comment out (--) columns, tables, logic, etc. from a SQL statement for debugging. As far as working it out and posting it, there's really no secret:

  1. everything on its own line
  2. SELECT, FROM, GROUP BY, HAVING, ORDER BY (not WHERE and AND)
  3. elements (columns, tables, where conditions)
  4. open and close parenthesis
  5. leading commas

If anyone else finds it useful, great. You can find more examples in my other posts...

Michael J. Ort

In article <a6rH4.22393$Xk2.89236_at_tor-nn1.netcom.ca>,   "David Lloyd-Jones" <icomm5_at_netcom.ca> wrote:
>
> "Michael J. Ort" <michael_ort_at_my-deja.com> wrote in message
> news:8clb96$920$1_at_nnrp1.deja.com...
> > Try this:
> >
> > SELECT
> > Employee.szlastname
> > , Employee.szfirstname
> > , EmployeeSalary.dtstartdate
>
> Hmmmm. Hungarian SQL, eh?
>
> Have you worked it out in full and posted it anywhere?
>
> -dlj.
>
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Sat Apr 08 2000 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US