Solved

export sql to excel

Posted on 2014-03-24
6
265 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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
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…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

929 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