Page 1 of 1

Formatting code

Posted: Fri 10 Oct 2014 12:22
by thread.start
Hello
I format the code

Code: Select all

select
	1 as name
	,N'test test test test test test ' + cast('111' as nvarchar(10)) + N'test test test test test test test test' + case
		when 1 = 0
		then 'Test'
		else N'No test'
	end as [Alias]
from
	[dbo].[Table1] [t]
where
	column1 in (
		select
			2
		from
			Table2
	)
But I want:

Code: Select all

select
	1 as name
	,N'test test test test test test ' + cast('111' as nvarchar(10)) + N'test test test test test test test test' + case
							when 1 = 0
							then 'Test'
							else N'No test'
						end as [Alias]
from
	[dbo].[Table1] [t]
where
	column1 in (
						select
							2
						from
							Table2
	)
It's about tablature in "in" and "case". Is it possible

Maybe... is it possible:

Code: Select all

select
	1 as name
	,N'test test test test test test '
		+ cast('111' as nvarchar(10))
		+ N'test test test test test test test test'
		+ case
			when 1 = 0
			then 'Test'
			else N'No test'
		end
	as [Alias]
from
	[dbo].[Table1] [t]
where
	column1 in (
		select
			2
		from
			Table2
	)

Re: Formatting code

Posted: Fri 10 Oct 2014 14:03
by alexa
It's about tablature in "in" and "case". Is it possible
Unfortunately, dbForge can't perform such a formatting.
Maybe... is it possible:
You can vote for the following suggestion on our UserVoice forum http://devart.uservoice.com/forums/8789 ... hmetic-ope

We collect and analyze the information from this forum in order to make a proper roadmap for future product releases.

Re: Formatting code

Posted: Fri 10 Oct 2014 18:03
by thread.start
Thank you very much for your response!

Re: Formatting code

Posted: Mon 13 Oct 2014 13:37
by alexa
Please let us know if any questions arise.