August 30, 2012 at 12:47 pm
I have a very complicated SQL statement that creates 3 separate groups of results for Hospital Meaningful Use Attestation.
1. Summarized Data
2. Detailed Data
3. Link for xml submission
How can I save all 3 of those items in one file? I can't find a way to save results so that we can keep this data for 7 years which is required. If anyone can provide me a suggestion, that'd be great!!
Thanks!
August 30, 2012 at 1:01 pm
christina.honnert (8/30/2012)
I have a very complicated SQL statement that creates 3 separate groups of results for Hospital Meaningful Use Attestation.1. Summarized Data
2. Detailed Data
3. Link for xml submission
How can I save all 3 of those items in one file? I can't find a way to save results so that we can keep this data for 7 years which is required. If anyone can provide me a suggestion, that'd be great!!
Thanks!
Pretty sparse on the details but have you looked at "Results to File"? It is right there on the toolbar in SSMS (ctrl+shift+F).
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 30, 2012 at 1:12 pm
Actually I have done that. However when I select that, nothing happens.
August 30, 2012 at 1:16 pm
christina.honnert (8/30/2012)
Actually I have done that. However when I select that, nothing happens.
Did you run your query after changing that setting? It does not just save what is currently in the results window. It means that all future queries will be output to file instead of the grid.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 30, 2012 at 1:21 pm
Sorry I had no clue how that worked. OK, that did create a file. Is there a way to change the default file format? It saves it as a .rpt, but because I don't have Crystal Reports on my machine, I can't open up the results.
August 30, 2012 at 1:25 pm
christina.honnert (8/30/2012)
Sorry I had no clue how that worked. OK, that did create a file. Is there a way to change the default file format? It saves it as a .rpt, but because I don't have Crystal Reports on my machine, I can't open up the results.
No need to apologize. It is a bit clunky for sure. 😉 I don't know about changing the default file type. I don't have Crystal (haven't used it in a LONG time). On both my XP and Win7 boxes it opens with WordPad. You can always just set the file type to *.* and type in Somefile.txt or whatever. It really just produces a text file.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
August 30, 2012 at 1:28 pm
Awesome - thank you! I did an 'open with Excel' and I can view it much better than a text file. I'll see if this will work for my manager. Thanks again!!
August 30, 2012 at 1:29 pm
christina.honnert (8/30/2012)
Awesome - thank you! I did an 'open with Excel' and I can view it much better than a text file. I'll see if this will work for my manager. Thanks again!!
My pleasure. glad that works for you.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply