| Author |
Topic |
|
nmarks
Yak Posting Veteran
53 Posts |
Posted - 2007-11-07 : 09:30:04
|
| Does anyone know if there's a quick way to make variable type declarations line up neatly?In the example below all the variables are declared as integers (INT). Does SQL Server or Visual Studio have a facility to get these INTs to line up quickly?DECLARE @age_val_life1 INT; DECLARE @age_val_life2 INT; DECLARE @age_val_life1_for_CC INT; DECLARE @age_val_life2_for_CC INT; |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-11-07 : 09:33:48
|
| what do you mean?maybe something like:DECLARE @age_val_life1 INT, @age_val_life2 INT, @age_val_life1_for_CC INT, @age_val_life2_for_CC INT;_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
Kristen
Test
22859 Posts |
Posted - 2007-11-07 : 09:38:51
|
| Some sort of Pretty Print for SQL maybe? |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-07 : 09:45:01
|
quote: Originally posted by nmarks Does anyone know if there's a quick way to make variable type declarations line up neatly?In the example below all the variables are declared as integers (INT). Does SQL Server or Visual Studio have a facility to get these INTs to line up quickly?DECLARE @age_val_life1 INT; DECLARE @age_val_life2 INT; DECLARE @age_val_life1_for_CC INT; DECLARE @age_val_life2_for_CC INT;
Why does it matter? Try here www.sqlinform.comMadhivananFailing to plan is Planning to fail |
 |
|
|
nmarks
Yak Posting Veteran
53 Posts |
Posted - 2007-11-07 : 09:49:27
|
| Doh!When I posted this question I puts lots of tabs all over the place so none of the INTs lined up - it was a real hotch-potch. Unfortunately I think this website's parser removed the duplicates!!Nonetheless, the example as it appears above still suffices to understand the question: As it appears on screen above, what I'd really like is for all four INTs (or NVARCHARS or FLOATs or whatever) to line up in a column - pretty print as Kristen put it.Can Server or Visual Studio do this with just the click of a mouse? |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-11-07 : 09:50:34
|
| no_______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenpSSMS Add-in that does a few things: www.ssmstoolspack.com |
 |
|
|
nmarks
Yak Posting Veteran
53 Posts |
Posted - 2007-11-07 : 09:51:54
|
| It matters for ease of reading. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-11-07 : 09:52:16
|
If you expect this DECLARE @age_val_life1 INT;DECLARE @age_val_life2 INT;DECLARE @age_val_life1_for_CC INT;DECLARE @age_val_life2_for_CC INT; Try the link I postedMadhivananFailing to plan is Planning to fail |
 |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
|
|
DonAtWork
Master Smack Fu Yak Hacker
2167 Posts |
Posted - 2007-11-07 : 12:41:55
|
| Visual Studio will do this for you. It has been too long for me to remember where to set that, however.[Signature]For fast help, follow this link:http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspxLearn SQLhttp://www.sql-tutorial.net/ http://www.firstsql.com/tutor.htm http://www.w3schools.com/sql/default.asp |
 |
|
|
|