SQL query for copying table data to Excel file - sql

Is there any SQL query for copying an Oracle database table's data into an Excel file?
Please let me know if there are any. Thanks

You could look into query2sheet for PL/SQL (Oracle)
https://technology.amis.nl/2011/02/19/create-an-excel-file-with-plsql/

Related

Generating SQL INSERT from data in Excel file

I have a spreadsheet with thousands of records. Columns correspond to fields in a table in a SQL Server database. What is the quickest way to generate an SQL query to insert this data?
#Al2110
based on your query, To generating SQL insert from data in excel file that show in below:
insert into customers values('" &B3 &"','" &C3& "','"&D3&"');
I hope above information will be useful for you.
Thank you.
SQL Server Import and Export Wizard is a convenient option.

Special Character show up in SSIS

I transfer data from Postgre to SQL Server using SSIS. and somehow the result is not the same like the source, There is special character between code.
Source data in Postgre CL019-B-1003MIN01
Destination data in SQL CL019-B-1003�MIN01
Can you guys have a clue about this ?
Thanks

Save Results of a SQL Query to an Excel File

I have an SQL Query I'm using to Pull Beds by Unit and the related Number of Beds in Use and Available.
What is the SQL Syntax to have the results of the query save to an excel file (existing or new).
Please Note: I have been searching and I can't believe this isn't easy to figure out. Lots of people seems to use other tools but I want to do it in SQL Stored Procedure - Is this possible?
Thanks so much for your help!
The easier way to do this is from Excel, utilize a connection to your SQLDB and then pull the data into excel, that is the most efficient way to do it.

Export Excel table to sql using VBA

Can anyone point me to an example for exporting an excel table into an sql table, assuming the same structure, using VBA? I'm using Excel 2007. I've seen examples that read the data one row at a time and either run one insert per row, or build their recordset, and do UpdateBatch. Is there a way where I can select all record from the source table in excel and insert them all into the target sql table?
Bulk Insert is what you are looking for.
Try these:
Stackoverflow question
Bulk Insert - social msdn
Other way is to import in sql management studio
Import Excel spreadsheet columns into SQL Server database

Add Description From Excel File to Columns description in SQL

I have a DB (in SQL Server 2008 SP3) include many tables and each tables have a lot of columns, in other hand I have an Excel file include description for any of my DB's columns (In SQL Server Management Studio when you want create a table, in design mode, for each column in property window there is a description field), So I am interesting in add this(Excel) description to description of columns in DB (of course not by hand and one by one), does any one have any idea about this?
Knock up some VBA to iterate through the Excel data, calling the database for each table/column.
The SQL Server stored procedure you want (if I understand correctly) is sp_addextendedproperty to add comments about objects in SQL Server
You can get help from some references given below: please have a look over there, thanks
a. Reading and Writing Excel
b. Reading Excel and then save to your DB