Formatting code

Discussion of open issues, suggestions and bugs regarding database management and development tools for SQL Server
Post Reply
thread.start
Posts: 2
Joined: Fri 10 Oct 2014 12:02

Formatting code

Post by thread.start » Fri 10 Oct 2014 12:22

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
	)

alexa

Re: Formatting code

Post by alexa » Fri 10 Oct 2014 14:03

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.

thread.start
Posts: 2
Joined: Fri 10 Oct 2014 12:02

Re: Formatting code

Post by thread.start » Fri 10 Oct 2014 18:03

Thank you very much for your response!

alexa

Re: Formatting code

Post by alexa » Mon 13 Oct 2014 13:37

Please let us know if any questions arise.

Post Reply