 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
seth.rothman
Joined: 29 Jan 2008 Posts: 54 Country: United States |
|
Formatting Question in v4 |
|
Quick question. I'd like my FROM and JOIN keywords to be left-aligned together. For example:
select field1,field2,field3
from table1 t1
inner join table2 t2
on t1.field1 = t2.field2
where t1.field > 0
formats to:
SELECT field1,
field2,
field3
FROM table1 t1
INNER JOIN table2 t2
ON t1.field1 = t2.field2
WHERE t1.field > 0
which is almost what I want. I'd like the final result to look like this:
SELECT field1,
field2,
field3
FROM table1 t1
INNER JOIN table2 t2
ON t1.field1 = t2.field2
WHERE t1.field > 0
Is this possible?
|
|
Thu Nov 06, 2008 12:38 pm |
|
 |
seth.rothman
Joined: 29 Jan 2008 Posts: 54 Country: United States |
|
|
|
I just reviewed my posting and the spaces were stripped out. Oops. Here's a screenshot

|
|
Thu Nov 06, 2008 12:42 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
I don't see any difference. Have you pasted the text or typed it directly?
|
|
Thu Nov 06, 2008 12:43 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
Ok. I see the screenshot now. Thanks.
Sure this can be done. Here is how
Open SQL Assistant Options -> activate Code Formatting tab -> select formatting style you want to customize, for example, "T-SQL Custom Style 1" -> in the specific statements list on the left choose SELECT, on the right adjust the formatting pattern for this statement as required, you can set spacing for each required element, for example, remove spaces before JOIN -> Click "Test..." button in the top-right corner of the Options dialog to check results, enter some test SQL and see if it does what you want, if yes, close the test box and Apply changes.
|
|
Thu Nov 06, 2008 12:48 pm |
|
 |
seth.rothman
Joined: 29 Jan 2008 Posts: 54 Country: United States |
|
|
|
That works perfectly. Thanks for you help.
|
|
Thu Nov 06, 2008 12:59 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7948
|
|
|
|
You're welcome.
|
|
Thu Nov 06, 2008 1:01 pm |
|
 |
|
|
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
|
|
|