Solved

How to retrive data  inrow/column view

Posted on 2009-05-07
4
160 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
I went with a stored procedure approach
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
SQL Question 1 28
Get row count of current SQL query 8 34
Isolation level in SQL server 3 43
Delete from table 6 36
I've encountered valid database schemas that do not have a primary key.  For example, I use LogParser from Microsoft to push IIS logs into a SQL database table for processing and analysis.  However, occasionally due to user error or a scheduled task…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now