Solved

export sql to excel

Posted on 2014-03-24
6
262 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
Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

 

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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

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 …
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

21 Experts available now in Live!

Get 1:1 Help Now