RE: Re: Formatter - JOIN ON
Andre Vergison <[email protected]>
| Newsgroups | gmane.comp.db.oracle.toad.free |
|---|---|
| Message-ID | <[email protected]> |
Currently there is no option to do what I think you wish to obtain.
Let’s analyze for a moment how we can fold the join.
If the right hand margin is very large then no folding occurs after “INNER JOIN” :
FROM party pty
INNER JOIN party_address pa ON pa.party_id = pty.party_id AND pa.address_type_id = 1
When narrowing the right hand margin then currently it initially folds like this:
FROM party pty
INNER JOIN party_address pa
ON pa.party_id = pty.party_id AND pa.address_type_id = 1
When narrowing futher then we get (2nd folding mode):
FROM party pty
INNER JOIN
party_address pa
ON pa.party_id = pty.party_id
AND pa.address_type_id = 1
In contrast, the following is the first folding mode which I understand you wish to see:
FROM party pty
INNER JOIN party_address pa ON pa.party_id = pty.party_id
AND pa.address_type_id = 1
Okay, but how should it get folded further whenever the right hand margin is exceeded? Would the 2nd folding mode as above be okay?
Thanks,
Andre
________________________________
From: [email protected] [mailto:[email protected]] On Behalf Of ss052111
Sent: maandag 29 oktober 2012 19:00
To: [email protected]
Subject: [toad] Re: Formatter - JOIN ON
Let me try that again:
SELECT pty.party_id
,pty.last_name
,pty.first_name
,pa.street_address
,pa.city_name
,pa.state_code
,pa.zip_code
,pe.email_address
FROM party pty
INNER JOIN party_address pa ON pa.party_id = pty.party_id
AND pa.address_type_id = 1
INNER JOIN party_email pe ON pe.party_id = pty.party_id
--- In [email protected], "ss052111" <sean.sexton@...> wrote:
>
> Does anyone know if the Formatter options may be set to keep the ON keyword on the same line as the JOIN clause? I've been looking, but have had no luck. Here's an example of what I'm trying to do:
>
> SELECT pty.party_id
> ,pty.last_name
> ,pty.first_name
> ,pa.street_address
> ,pa.city_name
> ,pa.state_code
> ,pa.zip_code
> ,pe.email_address
> FROM party pty
> INNER JOIN party_address pa ON pa.party_id = pty.party_id
> AND pa.address_type_id = 1
> INNER JOIN party_email pe ON pe.party_id = pty.party_id
>
> Of course, if this is not currently possible, I would like to formally lobby for an enhancement. :)
>
> Regards,
> Sean
>