?
Solved

export sql to excel

Posted on 2014-03-24
6
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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 2000 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

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

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

If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In this article I will describe the Copy Database Wizard 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.
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

764 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