Toad formatting for select

Hi

I have a query say something like below

select

ababa, – Name

dfa,-- Address

dasfas – State

from dual;

Now I need a formatter setting so it appears like below where inline comments should be formatted as below (in same line)

SELECT

ababa, – Name

dfa, – Address
dasfas – State
FROM DUAL;

Can you please tell me the formatter setting ?

Thanks

Matt

In Toad you need to select View -> Toad Options

and on the right pannel of the new window , you will find an option named Formatter,

Open this option and on the right side of the window you will find the options Comments.

you only need then to check the option Align at the right margin.

Note: if your sql has not more than 3 columns it won't format the comment's well,

example:

An sql with 3 columns will be formated something like that below

SELECT AAA, --Comment

                    BBB,                                         --Comment

                                            CCC                             --Comment

    FROM TABLE

The reason for that is that the List Defaults option list arrangement in Formatter is set to more than 3 columns , so if you have 4 columns the Formater will be like this

SELECT AAA, --Comment

    BBB,                                 --Comment

    CCC ,                                --Comment

    DDD                                --Comment

FROM TABLE