Solved

How to retrive data  inrow/column view

Posted on 2009-05-07
4
168 Views
Last Modified: 2012-05-06
My question is this

I have a database table that contains 1m's of rows. Each row has a product, queue and column value. I need to obtain data from this in a spreadsheet type of view order by product

               column   column  column
queue
queue
queue

What is the best way to obtain this data in a format simular to the above
0
Comment
Question by:robert_a_jenkin
  • 2
  • 2
4 Comments
 
LVL 42

Expert Comment

by:EugeneZ
ID: 24326488
use Export\import utility
from SSMS->right click your  DB-> tasks-> Export data->.... select Write query to specify the data to transfer...

http://www.databasejournal.com/features/mssql/article.php/3580216/SQL-Server-2005-Import--Export-Wizard.htm


or use bcp

http://social.msdn.microsoft.com/forums/en-US/transactsql/thread/31a15a51-f557-499c-96a9-df7faccde98d
0
 

Author Comment

by:robert_a_jenkin
ID: 24326524
My question was not clear I am looking to have this data returned to crystal reports for a report reflecting the data in a grid design.

I am guessing that the crystal report would have to call a stored procedure that would return the results to the report like so

product, queue, column 1, column 2, column 3.... column 8
0
 
LVL 42

Accepted Solution

by:
EugeneZ earned 500 total points
ID: 24329733
for CR :
you can
 or
get Tables : and in place and run select statement\design report from the table fields, etc
or
 as you said
the better solution (if it is good for your report requirements)
Stored procedure..
0
 

Author Closing Comment

by:robert_a_jenkin
ID: 31579022
I went with a stored procedure approach
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

There are some very powerful Data Management Views (DMV's) introduced with SQL 2005. The two in particular that we are going to discuss are sys.dm_db_index_usage_stats and sys.dm_db_index_operational_stats.   Recently, I was involved in a discu…
In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question