Toad World® Forums

Formatter options and CTAS statements


#1

I have a very odd problem since going to 12+ Toad for Oracle:

Whenever using the code formatter it has begun adding an extra line break between the CTAS statement. An example is below:

CREATE TABLE temp_vppp_1

AS

SELECT

The extra breakline causes all kinds of havoc when I move these into SQL*Plus style scripts. I cannot find anything in the options to remove this extra break. Can anyone help?


#2

Can you please paste a full statement causing the issues, along with a copy of the formatter options you were using? (go to the top pane of the formatter options tree, and press “Copy to clipboard”)

Thanks,

Andre


#3

I don’t use these forums so hopefully this pastes properly. I attached one that formats properly and one that fails.


CREATE TABLE test

AS

SELECT group_client_id, CASE WHEN TO_NUMBER (concat_levels) <= 6 THEN 1 WHEN TO_NUMBER (concat_levels) > 6 THEN 1 END AS owner_level_cd

 FROM DUAL;

CREATE TABLE test

AS

SELECT DISTINCT owner_level_cd, level3_descr

 FROM DUAL

WHERE owner_level_cd IS NOT NULL;

OPTIONS:

252 5.256.0 5.256 140 0 1 2 2 1 2 S 1 W S 1 0