Solved

export sql to excel

Posted on 2014-03-24
6
272 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
Free Webinar: AWS Backup & DR

Join our upcoming webinar with experts from AWS, CloudBerry Lab, and the Town of Edgartown IT to discuss best practices for simplifying online backup management and cutting costs.

 

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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
database level memory cache..? 8 37
Change this SQL to get all nodes 3 41
SQL- GROUP BY 4 26
Database Owner 3 21
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

730 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