openrowset Questions

11

I am trying to import data from Excel 2007 (.xlsx) files into SQL Server 2008 using a T-SQL OpenRowset() command with the "Microsoft.ACE.OLEDB.12.0" OLE DB provider, and I'm getting a persistent "C...
Deposit asked 10/1, 2012 at 2:48

27

Solved

I'm trying to run the following statement but am receiving the error messages just below. I have researched answers to no end and none have worked for me. I'm running Office 365 (64bit). I have loa...
Witenagemot asked 8/10, 2014 at 22:3

7

I am trying to copy the data of testdabse.invoice table to basecampdev.invoice table. testdabse is a local database while basecampdev is in the server. My query for copying data to another table ...
Inhumanity asked 4/1, 2013 at 8:32

1

This can be a debatable answer, but I'm looking for the case where a local Excel file needs to be exported to a local SQL Server 2008' table. Has anyone ever had the chance to check execution time...
Hohenstaufen asked 17/8, 2010 at 16:32

7

Solved

Having an interesting issue. I'm reading from an excel file on a server via an OpenRowset in Sql2005. I've run the query a number of times without any problems. I've just gone out for a quick meeti...
Probabilism asked 1/9, 2009 at 12:1

4

There are plenty of examples around showing how to use OPENROWSET and OPENDATASOURCE to open queries against tables on remote SQL servers, and to get data from files on other servers. Unfortunately...
Carisa asked 6/5, 2017 at 2:50

6

Solved

I'm having trouble with this query: SELECT * FROM OPENROWSET( 'SQLNCLI', 'DRIVER={SQL Server};', 'EXEC dbo.sProc1 @ID = ' + @id ) Gives an error: Incorrect syntax near '+'. Anyone kno...
Seclusive asked 12/12, 2012 at 1:40

3

Solved

I am successfully exporting to excel with the following statement: insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=C:\template.xls;', 'SELECT * FROM [SheetName$]') select ...
Cymophane asked 26/5, 2009 at 10:11

4

I am trying to run the following query: SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=C:\Somefile.xlsx', 'SELECT * FROM [Sheet$]') But I get this error: Cannot initi...
Alsatian asked 13/12, 2013 at 17:33

3

Solved

I am looking for a quick-and-dirty way to import CSV files into SQL Server without having to create the table beforehand and define its columns. Each imported CSV would be imported into its own t...

1

I'm trying to import the below excel file present in the azure blob storage into sql server EXCEL File Query SELECT * FROM OPENROWSET( BULK 'container/testfile.xlsx', DATA_SOURCE = 'Exter...
Radioactivate asked 16/5, 2019 at 6:27

4

Solved

I am trying to export from my Table data into Excel through T-SQL query. After little research I came up with this INSERT INTO OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=G:\Test...
Malawi asked 2/5, 2016 at 16:55

1

I'm a newbie struggling with trying to import XML from an external third-party into SQL Server. I tried this SQL with the XML below and it pukes with "XML parsing: line 10, character 81, semi...
Dissolute asked 27/10, 2016 at 23:33

1

Solved

I am trying to use a variable filepath in a SQL Openrowset command. I'm aware that it can't explicitly accept a variable and that I need to make use of dynamic SQL. What currently works - SELECT...
Tengdin asked 3/10, 2016 at 9:6

5

Solved

Been investigating for a while now and keep hitting a brick wall. I am importing from xls files into temp tables via the OpenRowset command. Now I have a problem where I’m trying to import a certai...
Lara asked 26/8, 2009 at 12:26

2

I'm creating a stored procedure which gets some parameters and in turn these parameters are sent to another stored procedure which I'm calling from openrowset but I'm getting some syntax errors. C...
Sarilda asked 24/4, 2012 at 6:25

3

Solved

My Scenario I'm working on a database which will contain many details from various Stored Procedures in different databases across the entire server. The information I'm attempting to gather now i...
Dudek asked 19/10, 2011 at 18:54

1

Using Sql server 2005 I need to call a stored procedure that has many parameters and one which is an image column that is used for word document. I cannot change database since it's not under my c...
Andino asked 16/3, 2014 at 11:16

4

Solved

I'm trying to do an UPDATE action to a remote table from a local query. Obviously i know it should be with an OPENROWSET but i don't know how to do it. I know you can Insert to an OPENROWSET doing...
Librettist asked 6/9, 2013 at 17:11

2

Solved

I have a set of audio files with names GreenLine1.mp3, GreenLine2.mp3 e.t.c. I'm going to write them into a table as BLOB (I use MS SQL Server'08), here's my sql request: DECLARE @aud AS VARBINARY...
Intestinal asked 8/7, 2011 at 7:57

1

Solved

I want to execute simple statement: SELECT * FROM OPENROWSET('MICROSOFT.JET.OLEDB.4.0','Text;Database=C:\Temp\;','SELECT * FROM [test.csv]') And suddenly I get this message today morning: Msg ...
Geronto asked 13/3, 2012 at 16:2

2

I will use the following sql to read data from excel, but sometimes I need to skip first several rows. e.g the real data begins from line 5, so I need to skip the first 4 rows, is that doable? SE...
Audre asked 8/2, 2011 at 3:13

3

Solved

I am using openrowset to import a csv file into SQL Server. One of the columns in the csv file contains numbers in scientific notation (1.08E+05) and the column in the table it is being inserted B...
Alcala asked 19/9, 2011 at 15:9

1

Solved

SQL Server is able to open excel sheets (xlsx), access databases (mdb) and other data streams using data providers (e.g. JET, ACE) and OPENROWSET. Are there similar facilities to extract data from...
Schematic asked 30/11, 2011 at 20:10

8

Solved

This question is long winded because I have been updating the question over a very long time trying to get SSIS to properly export Excel data. I managed to solve this issue, although not correctly....
Brandebrandea asked 15/4, 2009 at 18:59

© 2022 - 2025 — McMap. All rights reserved.