SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


The Best Kept Secret About SQL Query Analyzer


The Best Kept Secret About SQL Query Analyzer

Author
Message
Alexander Yuryshev
Alexander Yuryshev
SSC-Enthusiastic
SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)SSC-Enthusiastic (166 reputation)

Group: General Forum Members
Points: 166 Visits: 1
Something wrong in this kingdom.
Is it joke?
For what reason such a meaningless article?
My mark - 0. Or even -2.
Mark Hickin
Mark Hickin
SSC-Addicted
SSC-Addicted (417 reputation)SSC-Addicted (417 reputation)SSC-Addicted (417 reputation)SSC-Addicted (417 reputation)SSC-Addicted (417 reputation)SSC-Addicted (417 reputation)SSC-Addicted (417 reputation)SSC-Addicted (417 reputation)

Group: General Forum Members
Points: 417 Visits: 156

As far as I was aware, it wasn't that this was a secret, it was just so obvious that noone bothered to mention it before.

And certainly not with so many '!!!!!!!!!'s

How about this instead.

Open Enterprise Manager. Navigate to a table. Highlight it.

Hit Ctrl+C.

Goto Query Analyzer.

Hit Ctrl+V


lancea
lancea
Old Hand
Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)Old Hand (383 reputation)

Group: General Forum Members
Points: 383 Visits: 67

Hi Graham,

It could be that I'm really tired (and I am), but step 3 of Method 1 says:

Click "Results in Text"

So we're no longer in "Grid" mode. The article therefore doesn't tell us how to get the header-row of the grid results into Excel. I'd like to do that.

You ask "What does this mean? Are you saying that you knew innately that you had to set Results output format as Tab Delimited?". Well, yes. I use Excel a little bit, and SQL Server a lot. I've been putting results into Excel this way for years. You are correct that it's not entirely natural as it was learned behaviour, but it's as natural to me as eating pizza.

Regards

Lance





Robbac
Robbac
SSC-Addicted
SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)SSC-Addicted (406 reputation)

Group: General Forum Members
Points: 406 Visits: 18

Man..! I normally read all articles that are posted here at SQLServerCentral, some very good ones and some not that good. But ok, all topics can't interest everyone.

But when I got the mail and read the headlline "Best Kept Secret.." I was really suprised. Wow, was there something to know about a tool that I've used for sooo many years?

I hope that this article has been to use for someone. I self just got suprised that this made it to the "article of the day".




robbac
___the truth is out there___
Robert Newnham
Robert Newnham
Forum Newbie
Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)Forum Newbie (9 reputation)

Group: General Forum Members
Points: 9 Visits: 1
Not a secret, but a good post for those who have not spotted it.
Slabber
Slabber
Old Hand
Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)Old Hand (376 reputation)

Group: General Forum Members
Points: 376 Visits: 150

Hi Lance

-----------------

It could be that I'm really tired (and I am), but step 3 of Method 1 says:

Click "Results in Text"

So we're no longer in "Grid" mode. The article therefore doesn't tell us how to get the header-row of the grid results into Excel. I'd like to do that.

---------------------

As long as step 8 is followed (Click "Print column headers(*)") which I think is the default anyway then the header row will be there. Try it and see!

Cheers - Graham





Paul Cresham
Paul Cresham
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1347 Visits: 44

I've been using "Data > Text to Columns" for years...

Such a simple little thing, but it will save some time.

Mark Hickin: I like the EM/QA copy & paste trick; haven't seen that before. Not that I'd use it much but handy to know nonetheless.


Paul Cresham
Paul Cresham
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1347 Visits: 44

Just something to add actually: a possible pitfall (when using Method 1 at least). I have a table with a key that is a CHAR(18) and its data are something like this:

200402280000000884

Could also be a BIGINT of course. When copied and pasted to Excel using tab-delimited output, because Excel can't handle such a large number, this gets changed to:

200402280000000000

(Even though it's a CHAR data type, because Excel is using "General" formatting, it assumes it to be numeric.)

It's easy to miss this at first. The only way I've found to get around it so far is to use the Column Aligned option, then when doing "Data > Text to Columns", on the screen where you set up data types, you can change it from General to Text and the full number will be preserved.


Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (162K reputation)SSC Guru (162K reputation)SSC Guru (162K reputation)SSC Guru (162K reputation)SSC Guru (162K reputation)SSC Guru (162K reputation)SSC Guru (162K reputation)SSC Guru (162K reputation)

Group: General Forum Members
Points: 162519 Visits: 33199
I thought this was a useful, well written article. Not exactly up to the advertising, but very good. Please, drop a few of the exclamation points next time.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
ivan gonzalez-195804
ivan gonzalez-195804
SSC-Enthusiastic
SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)SSC-Enthusiastic (174 reputation)

Group: General Forum Members
Points: 174 Visits: 1

I enjoyed the explanation, it was simple to follow. I hope the bunch of "experts" here would come up with something on their own instead of being so critical.

Nice Job.


Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum







































































































































































SQLServerCentral


Search