Thursday, March 8, 2012

"Save" and "Open" in Query Designer

As far as I can tell, there is no way to save a query and open it later
in Query Designer, right?
As far as I know, outside of the flawed and obsolete MSQuery, there is
no ad hoc data editor in SQL Server 2000 tools besides Query Designer,
right?
By now, you probably see what I'm getting at- I need a tool like Query
Designer that can be used to edit data without having to go through the
overhead of recomposing the query or cutting and pasting it into Query
Designer. My conception of it would be to have something like the DTS
folder in EM for queries where they could be created or opened.
Just wanted to check that I am not missing something.
Thanks,
JP
SocSecTrainWreck@.earthlink.net wrote:
> As far as I can tell, there is no way to save a query and open it later
> in Query Designer, right?
> As far as I know, outside of the flawed and obsolete MSQuery, there is
> no ad hoc data editor in SQL Server 2000 tools besides Query Designer,
> right?
> By now, you probably see what I'm getting at- I need a tool like Query
> Designer that can be used to edit data without having to go through the
> overhead of recomposing the query or cutting and pasting it into Query
> Designer. My conception of it would be to have something like the DTS
> folder in EM for queries where they could be created or opened.
> Just wanted to check that I am not missing something.
> Thanks,
> JP
>
Use Query Analyzer. That's what it's for. And you can save your
scripts and rerun them whenever you want to.
Simon Worth
|||Simon Worth wrote:[vbcol=seagreen]
> SocSecTrainWreck@.earthlink.net wrote:
later[vbcol=seagreen]
is[vbcol=seagreen]
Designer,[vbcol=seagreen]
Query[vbcol=seagreen]
the[vbcol=seagreen]
Query[vbcol=seagreen]
DTS
> Use Query Analyzer. That's what it's for. And you can save your
> scripts and rerun them whenever you want to.
I guess I was missing something. All these years of using
ISQL/ISQLW/Query Analyzer and I never realized that you could edit data
with it. Thanks.
JP
|||SocSecTrainWreck@.earthlink.net wrote:
> Simon Worth wrote:
>
> later
>
> is
>
> Designer,
>
> Query
>
> the
>
> Query
>
> DTS
>
> I guess I was missing something. All these years of using
> ISQL/ISQLW/Query Analyzer and I never realized that you could edit data
> with it. Thanks.
> JP
>
You can edit it as long as there is a primary key supplied within the query.
Simon Worth
|||I think I misunderstood what you were saying.
When you refer to Query Designer, what tool are you referring to? The
tool that is built into EM (IE right click table, goto Open Table > Query)?
In Query Analyzer, if you right click a table and click Open, it will
return the contents of the table. You can modify the data within the
table if there is a primary key assigned.
I'm not sure if you can edit views through QA, but I doubt it.
Sorry for the confusion there.
Simon Worth
Simon Worth wrote:
> SocSecTrainWreck@.earthlink.net wrote:
> You can edit it as long as there is a primary key supplied within the
> query.
>
|||Simon Worth wrote:
> I think I misunderstood what you were saying.
> When you refer to Query Designer, what tool are you referring to?
The
> tool that is built into EM (IE right click table, goto Open Table >
Query)?
That's the one.

> In Query Analyzer, if you right click a table and click Open, it will

> return the contents of the table. You can modify the data within the

> table if there is a primary key assigned.
I don't see how either one will allow you to open a saved select
statement on a table, run it, and then edit the results. In the Query
Designer in EM you can edit the SQL statement to return whatever data
you want and then edit the result set. Changes are saved as you move
from one cell to another. But you can't save the select statement and
then reopen it later if you need to repeat the process for whatever
reason.
I was not aware that there was any way to edit tables in QA; is there
any way at all to restrict or order the results?

> I'm not sure if you can edit views through QA, but I doubt it.
I didn't want to have to create actual views. I wanted to be able to
save the select statement to a file that I could open and run.
|||QA won't let you run a script and edit the results, so that won't work.
But an option could be (not a good one however), to save the SQL script
in any text editor, and when you want to edit again in Query Designer,
just copy/paste the script from the text file into the SQL pane in Query
Designer.
Simon Worth
SocSecTrainWreck@.earthlink.net wrote:
> Simon Worth wrote:
>
> The
>
> Query)?
> That's the one.
>
>
>
>
> I don't see how either one will allow you to open a saved select
> statement on a table, run it, and then edit the results. In the Query
> Designer in EM you can edit the SQL statement to return whatever data
> you want and then edit the result set. Changes are saved as you move
> from one cell to another. But you can't save the select statement and
> then reopen it later if you need to repeat the process for whatever
> reason.
> I was not aware that there was any way to edit tables in QA; is there
> any way at all to restrict or order the results?
>
>
> I didn't want to have to create actual views. I wanted to be able to
> save the select statement to a file that I could open and run.
>
|||Enterprise Manager has never been build to edit data. Either you'll have to
use the application that's using the database, or you'll have to use Query
Analyser and then learn SQL so you are able to edit/update the data the way
you need.
Personally I'd say that editing data "outside" you application, is only for
the cases where you need to do mass changes of data or something has went
wrong with the "logic" in the data, so the application isn't able to handle
the data. In both cases you should only mess with the data manually if you
know SQL - and then it's no problem to run the proper commands in Query
Analyzer...:-).
Regards
Steen
SocSecTrainWreck@.earthlink.net wrote:
> Simon Worth wrote:
> That's the one.
>
>
> I don't see how either one will allow you to open a saved select
> statement on a table, run it, and then edit the results. In the Query
> Designer in EM you can edit the SQL statement to return whatever data
> you want and then edit the result set. Changes are saved as you move
> from one cell to another. But you can't save the select statement and
> then reopen it later if you need to repeat the process for whatever
> reason.
> I was not aware that there was any way to edit tables in QA; is there
> any way at all to restrict or order the results?
>
> I didn't want to have to create actual views. I wanted to be able to
> save the select statement to a file that I could open and run.

No comments:

Post a Comment