Question:
How do run a SQL script and have the data inputed in a Excel sheet.?
anonymous
1970-01-01 00:00:00 UTC
How do run a SQL script and have the data inputed in a Excel sheet.?
Four answers:
?
2016-12-05 16:12:42 UTC
in protecting with the question on importing the Excel 2007 files to sq. Server 2005, i favor to provide you the suggestions as follows: a million. Connection string challenge: Please examine when you're useful to connect both Excel 2007 and sq. Server 2005 because the information source effectively. The excelConnection looks to locate as you offered. Then that you will have the capacity to also upload "HDR=positive" to point that the common row includes columnnames, now no longer comprehend-how. "HDR=No;" shows the alternative. this may forestall the first row puzzled at the same time as importing to the sq. tables. 2. Please try your ODBC sq. Server connection string in basic terms so the relationship to sq. Server is ideal. except the ODBC, that you could also use SqlConnection and execute the SqlCommand merchandise with the statement that includes the excelConnection on your VB.internet code, yet now no longer in basic terms combine the completed in a unmarried sq. fact. proper the following article shows you the suitable way: Import Excel sheet into table 3. except the above strategies, that you'll remember to apply SqlBulkCopy type to import. proper the following article shows you the representation: Import Excel Spreadsheet information into sq. Server Database table utilizing SqlBulkCopy 4. there's a KB article in MSDN on the problem. despite the indisputable fact that if the object isn't utilized for sq. Server 2005, that it is also achievable to be experienced on sq. Server files Transformation amenities (DTS), Microsoft sq. Server 2005 Integration amenities (SSIS), sq. Server appropriate servers and sq. Server disbursed queries. they are significant on your paintings. the proper thanks to import information from Excel to sq. Server desire that ought to help you.
atlantindian
2007-05-06 17:01:49 UTC
If your RDBMS is MS SQL Server then there is a tool in it called. DTS(Datatranformation Services). Use the data can be directly sent to an Excel file.
Seth
2007-05-06 16:54:01 UTC
You can out put as a text...but I don't think you can go to excel...
anonymous
2007-05-06 18:00:06 UTC
Actually, DTS was dropped in SQL 2005; it does exist in SQL 2000.



Also, you don't specify which version of SQL you are using (Transact-SQL, MySQL, Oracle, PostGRE, etc.)



The easiest thing to do is simply export your records as a comma-delimited file. Basically, each field is surrounded with a single-quote, then followed by a comma, and each record is terminated with a newline.



There are some downloadable tools out there that will do this for you. For example, if you use MySQL and phpMyAdmin, it has an export feature that will dump your data to CSV.



You can then open the CSV file with Excel via File --> Open and it will import the data; you can then save the imported file as a real Excel sheet / workbook.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...