SQLCMD variables

Refactors and formats SQL code.

Moderators: Chris Auckland, David Atkinson, Anu Deshpande, Luke Jefferson

SQLCMD variables

Postby drsql » Tue Jan 16, 2007 11:57 pm

A nice enhancement would be to support the SQLCMD variables that allow you to build scripts like:

Code: Select all
:setvar database dbName

select *
from   $(databaseName).dbo.tablename


I build many of my scripts like this in order to support (too many) different databases.

Thanks
drsql
 
Posts: 39
Joined: Wed Aug 16, 2006 5:14 pm

Postby Daniel Handley » Mon Jan 22, 2007 6:17 pm

Hi

I have added this to the wish list for inclusion in the discussions when we begin to work on the next version.
Thanks for the feedback.
Regards
Dan
Daniel Handley
Red Gate Software Ltd
Daniel Handley
 
Posts: 198
Joined: Mon Feb 07, 2005 3:05 pm
Location: Red Gate Software

Wanted: SQLCMD support in SQL Refactor

Postby anildas » Mon Feb 25, 2008 10:27 pm

The last update to this issue was posted on January 22, 2007. Any news?
anildas
 
Posts: 7
Joined: Mon Feb 25, 2008 10:19 pm
Location: San Diego, California, USA

Postby tanya » Tue Feb 26, 2008 1:24 pm

Hello,

This feature has not been targeted to any specific release as yet because we have not got enough requests for the feature.
However, if more user requests flow in you will see it fixed in the near future.

Thanks,
Tanya
tanya
 
Posts: 252
Joined: Mon Apr 30, 2007 8:29 pm

Support for SQLCMD mode needed.

Postby weswinkler » Tue Sep 29, 2009 1:19 am

Consider this an urgent request for this feature!

I have begun working on projects generated with the Microsoft Visual Studio Team Edition Database Developer Version (aka DataDude). Many of the scripts must be run in SQLCMD mode in order to utilize project variables, stored in *.sqlcmdvars files.

When such a query is loaded into the SQL Management Studio and the query session is set to SQLCMD mode, it parses correctly and executes correctly. However, SQL Refactor cannot perform ANY functions, claiming there are errors. The script summarization feature, which I find particularly useful, is completely unavailable in SQLCMD mode.

See my post in the related forum for SQL Prompt. http://www.red-gate.com/MessageBoard/viewtopic.php?t=9671
weswinkler
 
Posts: 32
Joined: Tue Nov 11, 2008 8:12 pm

Postby fatherjack » Wed Oct 07, 2009 9:31 am

I would also support this feature being included ASAP
-----------------------------------------
Senior DBA
Careers South West Ltd
fatherjack
 
Posts: 224
Joined: Tue Mar 13, 2007 12:33 pm
Location: Cornwall


Return to SQL Refactor 1

Who is online

Users browsing this forum: No registered users and 0 guests

cron