SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
SQL Formatting, problem with parentheses

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
SQL Formatting, problem with parentheses
Author Message
ChrisFer



Joined: 30 May 2018
Posts: 2
Country: Peru

Post SQL Formatting, problem with parentheses Reply with quote
Hi, I use the program a lot, how can I configure the code format to obtain the following result:

select field1,field2,field3
from table1,table2
where ((field1 > field2) OR (field1 < field3) OR (field2 <field3> field2)

To:

SELECT field1,
field2,
field3
FROM table1,
table2
WHERE ((field1 > field2)
OR (field1 < field3)
OR (field2 < field3))

I have tried many ways, but I can not get the line break added, without parenthesis it works, but the idea is that it works with parentheses.

For example, i used this config:

(
(...)
AND (...)
OR (...)
)

But it does not work, the result shows everything in one line.

Any ideas?

Thanks.
Wed May 30, 2018 10:58 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 6634

Post Reply with quote
Hi. Specifying brackets in the format is not required. The default formatting rules should do what you describe if you choose Stacked rule. That would move AND and OR to new lines and indent them as well.

If you cannot get it to work at all, please try reverting to factory default settings. Don't need to reinstall anything, simply use Import /Export button and select to Load Default Settings.

Please let us know if that helps.
Wed May 30, 2018 11:08 am View user's profile Send private message
ChrisFer



Joined: 30 May 2018
Posts: 2
Country: Peru

Post Reply with quote
Yes, now I will try to adjust some syntax. Thank you
Wed May 30, 2018 11:52 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.