I have only recetly started using SQL server 2005 in anger and have
rather amusingly found that Microsoft have fixed something I always
considered a bug but have managed to make it worse. I wonder if maybe
I am missing something.
In Query Analyzer (SQL Server 2000) you were able to right click on a
table and select
Script Object to New Window As..Select
and you would get something like
SELECT [FIELDS] FROM [Table]
except usually you were dealing with a real table so you would get
SELECT [FIELD1], [FIELD2], [FIELD3], [FIELD4], [FIELD5], [FIELD6],
[FIELD7], [FIELD8], [FIELD9], [FIELD10] etc FROM [Table]
In this case, the table name would be off the edge of the screen to
the right. I was in a habit of hitting the End key and hitting CR
before the FROM which pushed the table name onto the second line.
i.e.
SELECT [FIELD1], [FIELD2], etc...
FROM [Table]
I always found this a bit annoying and wished there was a way to
change this behavior.
Now with SQL 2005 and Management Studio, you can right click on a
table and select
Script Table as ... Select To ... New Query Editor Window
and you get something like
SELECT [FIELD1]
, [FIELD2]
, [FIELD3]
, [FIELD4]
, [FIELD5] etc
FROM [Table]
So Microsoft have changed the behavior, but now the table name
dissapears off the bottom of the screen, I find this even MORE
frustrating as I have to scroll down to the bottom to see which table
I am using, also
sometimes I want to have several SELECT statements open, and this
means selecting all the fields and replacing with * or deleting the CR
for each line.
Does anyone have any comments or know of a way of changing the defalt
scripting behavior of Management Studio?<benb@.atwuk.com> wrote in message
news:e92d760a-90fc-4692-b8e8-ce4beacfaff2@.v17g2000hsa.googlegroups.com...
>I have only recetly started using SQL server 2005 in anger and have
> rather amusingly found that Microsoft have fixed something I always
> considered a bug but have managed to make it worse. I wonder if maybe
> I am missing something.
> In Query Analyzer (SQL Server 2000) you were able to right click on a
> table and select
> Script Object to New Window As..Select
> and you would get something like
> SELECT [FIELDS] FROM [Table]
> except usually you were dealing with a real table so you would get
> SELECT [FIELD1], [FIELD2], [FIELD3], [FIELD4], [FIELD5], [FIELD6],
> [FIELD7], [FIELD8], [FIELD9], [FIELD10] etc FROM [Table]
> In this case, the table name would be off the edge of the screen to
> the right. I was in a habit of hitting the End key and hitting CR
> before the FROM which pushed the table name onto the second line.
> i.e.
> SELECT [FIELD1], [FIELD2], etc...
> FROM [Table]
> I always found this a bit annoying and wished there was a way to
> change this behavior.
> Now with SQL 2005 and Management Studio, you can right click on a
> table and select
> Script Table as ... Select To ... New Query Editor Window
> and you get something like
> SELECT [FIELD1]
> , [FIELD2]
> , [FIELD3]
> , [FIELD4]
> , [FIELD5] etc
> FROM [Table]
> So Microsoft have changed the behavior, but now the table name
> dissapears off the bottom of the screen, I find this even MORE
> frustrating as I have to scroll down to the bottom to see which table
> I am using, also
> sometimes I want to have several SELECT statements open, and this
> means selecting all the fields and replacing with * or deleting the CR
> for each line.
> Does anyone have any comments or know of a way of changing the defalt
> scripting behavior of Management Studio?
>
If you drag the Columns node into the editing window it will insert a list
of column names in one line. All you have to do is type SELECT and FROM.
--
David Portas|||On 31 Jan, 19:28, "David Portas"
<REMOVE_BEFORE_REPLYING_dpor...@.acm.org> wrote:
> <b...@.atwuk.com> wrote in message
> news:e92d760a-90fc-4692-b8e8-ce4beacfaff2@.v17g2000hsa.googlegroups.com...
>
>
> >I have only recetly started using SQL server 2005 in anger and have
> > rather amusingly found that Microsoft have fixed something I always
> > considered a bug but have managed to make it worse. I wonder if maybe
> > I am missing something.
> > In Query Analyzer (SQL Server 2000) you were able to right click on a
> > table and select
> > Script Object to New Window As..Select
> > and you would get something like
> > SELECT [FIELDS] FROM [Table]
> > except usually you were dealing with a real table so you would get
> > SELECT [FIELD1], [FIELD2], [FIELD3], [FIELD4], [FIELD5], [FIELD6],
> > [FIELD7], [FIELD8], [FIELD9], [FIELD10] etc FROM [Table]
> > In this case, the table name would be off the edge of the screen to
> > the right. I was in a habit of hitting the End key and hitting CR
> > before the FROM which pushed the table name onto the second line.
> > i.e.
> > SELECT [FIELD1], [FIELD2], etc...
> > FROM [Table]
> > I always found this a bit annoying and wished there was a way to
> > change this behavior.
> > Now with SQL 2005 and Management Studio, you can right click on a
> > table and select
> > Script Table as ... Select To ... New Query Editor Window
> > and you get something like
> > SELECT [FIELD1]
> > =A0 =A0 =A0 =A0 =A0 =A0, [FIELD2]
> > =A0 =A0 =A0 =A0 =A0 =A0, [FIELD3]
> > =A0 =A0 =A0 =A0 =A0 =A0, [FIELD4]
> > =A0 =A0 =A0 =A0 =A0 =A0, [FIELD5] etc
> > FROM [Table]
> > So Microsoft have changed the behavior, but now the table name
> > dissapears off the bottom of the screen, I find this even MORE
> > frustrating as I have to scroll down to the bottom to see which table
> > I am using, also
> > sometimes I want to have several SELECT statements open, and this
> > means selecting all the fields and replacing with * or deleting the CR
> > for each line.
> > Does anyone have any comments or know of a way of changing the defalt
> > scripting behavior of Management Studio?
> If you drag the Columns node into the editing window it will insert a list=
> of column names in one line. All you have to do is type SELECT and FROM.
> --
> David Portas-
So no one knows of any way to customise the scripts generated when
scripting Script Table as .. ?|||<<So no one knows of any way to customise the scripts generated when
scripting Script Table as .. ?>>
AFAIK, no such customization is possible.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
<benb@.atwuk.com> wrote in message
news:16aeba87-35c6-4373-902c-12bd5720d132@.e23g2000prf.googlegroups.com...
On 31 Jan, 19:28, "David Portas"
<REMOVE_BEFORE_REPLYING_dpor...@.acm.org> wrote:
> <b...@.atwuk.com> wrote in message
> news:e92d760a-90fc-4692-b8e8-ce4beacfaff2@.v17g2000hsa.googlegroups.com...
>
>
> >I have only recetly started using SQL server 2005 in anger and have
> > rather amusingly found that Microsoft have fixed something I always
> > considered a bug but have managed to make it worse. I wonder if maybe
> > I am missing something.
> > In Query Analyzer (SQL Server 2000) you were able to right click on a
> > table and select
> > Script Object to New Window As..Select
> > and you would get something like
> > SELECT [FIELDS] FROM [Table]
> > except usually you were dealing with a real table so you would get
> > SELECT [FIELD1], [FIELD2], [FIELD3], [FIELD4], [FIELD5], [FIELD6],
> > [FIELD7], [FIELD8], [FIELD9], [FIELD10] etc FROM [Table]
> > In this case, the table name would be off the edge of the screen to
> > the right. I was in a habit of hitting the End key and hitting CR
> > before the FROM which pushed the table name onto the second line.
> > i.e.
> > SELECT [FIELD1], [FIELD2], etc...
> > FROM [Table]
> > I always found this a bit annoying and wished there was a way to
> > change this behavior.
> > Now with SQL 2005 and Management Studio, you can right click on a
> > table and select
> > Script Table as ... Select To ... New Query Editor Window
> > and you get something like
> > SELECT [FIELD1]
> > , [FIELD2]
> > , [FIELD3]
> > , [FIELD4]
> > , [FIELD5] etc
> > FROM [Table]
> > So Microsoft have changed the behavior, but now the table name
> > dissapears off the bottom of the screen, I find this even MORE
> > frustrating as I have to scroll down to the bottom to see which table
> > I am using, also
> > sometimes I want to have several SELECT statements open, and this
> > means selecting all the fields and replacing with * or deleting the CR
> > for each line.
> > Does anyone have any comments or know of a way of changing the defalt
> > scripting behavior of Management Studio?
> If you drag the Columns node into the editing window it will insert a list
> of column names in one line. All you have to do is type SELECT and FROM.
> --
> David Portas-
So no one knows of any way to customise the scripts generated when
scripting Script Table as .. ?
No comments:
Post a Comment