Solved

export sql to excel

Posted on 2014-03-24
6
268 Views
Last Modified: 2014-03-30
Dear
 I need to export  a certain table to excel file but when i have tried to do that it no export all my data , 1st i run select statement on the needed table and after that i have select all the data and choose save results as .csv file but not include all my table data
please advise .

my select statment as below
SELECT *
  FROM [HRDB].[dbo].[RAW_TRANSACTIONS]
0
Comment
Question by:Alkannetworks
  • 3
  • 3
6 Comments
 
LVL 18

Expert Comment

by:Jerry Miller
ID: 39950882
How many rows are in the table? You may be running into Excel limitations when you open the file. Try opening the file in Notepad++ or other text reader.
0
 
LVL 18

Expert Comment

by:Jerry Miller
ID: 39950887
Excel row limits:

2007, 2010, and 2013 - 1,048,576
2003 - 65,536
0
 

Author Comment

by:Alkannetworks
ID: 39952055
dears
you are right i have about 2.000.000 rows in sql select result that means it will not export ll rows to excel , ok how i can just select fields in a certain date and time , i need to select transactions for users in some  date and time how i can do that
table-design.jpg
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 

Author Comment

by:Alkannetworks
ID: 39952062
to clarify i need to select all transactions in 23-3-2014 from 7.30 am to 9.30 am
0
 
LVL 18

Accepted Solution

by:
Jerry Miller earned 500 total points
ID: 39954915
Since it is a datetime field, you should be able to use BETWEEN.

SELECT *
FROM [HRDB].[dbo].[RAW_TRANSACTIONS]
Where trans_time BETWEEN '3/23/2014 07:30:00.000' AND '3/23/2014 09:30:00.000'
0
 

Author Closing Comment

by:Alkannetworks
ID: 39964629
many thanks it works
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Removing SQL Replication from Microsoft SQL Server 2008 R2 2 34
SQL server is using more virtual memory. 5 84
SQL Server Question 5 36
Text file into sql server 5 27
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…

809 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