Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

The Best Kept Secret About SQL Query Analyzer Expand / Collapse
Author
Message
Posted Wednesday, October 26, 2005 2:26 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Sunday, June 24, 2007 2:53 AM
Points: 28, Visits: 1
Something wrong in this kingdom.
Is it joke?
For what reason such a meaningless article?
My mark - 0. Or even -2.

Post #232298
Posted Wednesday, October 26, 2005 2:42 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, November 24, 2011 2:31 AM
Points: 169, 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

 

 

Post #232305
Posted Wednesday, October 26, 2005 2:53 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Monday, November 26, 2012 7:59 PM
Points: 169, Visits: 62

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




Post #232309
Posted Wednesday, October 26, 2005 3:21 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Friday, November 9, 2012 5:47 PM
Points: 230, 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___
Post #232317
Posted Wednesday, October 26, 2005 3:34 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, February 7, 2007 10:19 AM
Points: 3, Visits: 1
Not a secret, but a good post for those who have not spotted it.
Post #232325
Posted Wednesday, October 26, 2005 3:41 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, August 6, 2012 1:17 AM
Points: 34, 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




Post #232329
Posted Wednesday, October 26, 2005 4:11 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, August 4, 2009 7:44 AM
Points: 263, 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. 

Post #232331
Posted Wednesday, October 26, 2005 4:20 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, August 4, 2009 7:44 AM
Points: 263, 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.

Post #232333
Posted Wednesday, October 26, 2005 6:04 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Today @ 6:57 AM
Points: 15,731, Visits: 28,133
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 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #232359
Posted Wednesday, October 26, 2005 6:19 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, February 8, 2006 5:36 AM
Points: 52, 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.

 

Post #232361
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse