Toad World® Forums

Formatting with comments weirdness


#1

I don’t think this will format like it should:

SELECT *
FROM all_objects
WHERE –
object_name < ‘B’ AND
owner = ‘SYS’


#2

Hi Jet,

Do you want the comment stay close to the WHERE as it is? There is a setting in Tools | Formatter Tools | Formatting Options. Go to Comments pane, you can uncheck the option Align at the right margin, then the comment in your example will stay where it is after you format it.

Thanks,
Vincent


#3

No, object_name and owner should line up. They don’t


#4

Hi Jet,

I used default formatting options and I got this:

/* Formatted on 2012-12-10 10:06:48 (QP5 v5.239) */
SELECT *
FROM all_objects
WHERE –
object_name < ‘B’ AND owner = ‘SYS’

Is this what you want? Could you open formatting options and go to Operators and Punctuations | AND - OR. Make sure you don’t select “Stacked” option in the style group, you should be able to get the same result as I did too.

Thanks,
Vincent


#5

I want the two where clauses to stack AND line up.


#6

Thanks for the information Jet. I get your point now. PT40988869 has been created for you. We will keep you posted when this can be fixed.

Thanks,
Vincent


#7