The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
19 views

Drivers issue for OpenRowSet

Recently, we move our openrowset code to production environment. SP uses OLEDB 15.0 Package use OLeDB 12.0 It is working properly on QA environment. But before going to Prod we uninstalled 12.0 ...
3
votes
3answers
267 views

9 digit zip codes are reporting LEN of 12

I am attempting to resolve some difficulties in getting zip codes to display properly. The original spreadsheet has zip codes of mixed 5 and 9 digit formats. After the import process, these 9 digit ...
3
votes
1answer
445 views

OPENQUERY and server permissions

when I run my stored procedure it is a complete success, even if I run it through exec. Running these: sp_GetServerLogins GO exec ( 'sp_GetServerLogins ') GO I get this: Needless ...
1
vote
0answers
112 views

SQL Server Compact Provider in SQL Server 2014 for OPENROWSET

I'm unfortunately well aware from many questions asked previously that SQL Server Compact 4 can no longer be opened as an object in SQL Server 2014 Management Studio. However I can't find any ...
3
votes
0answers
56 views

Import from dbf - collation

I select data from dbf files through OPENROWSET Visual FoxPro OLEDB. Despite forcing collation on columns (e.g. SELECT name COLLATE Polish_CI_AS FROM Employees) the polish specific characters keep ...
2
votes
3answers
26k views

OpenRowSet - How to configure OLE DB Provider to be used for for distributed queries

I have an Excel file with data and would like to update a table in database based on the data the Excel file contains. To do that I want to use OpenRowSet command. But I get the error below when even ...
1
vote
1answer
987 views

Import XML data retaining while creating ID's with relationships

I need to parse XML from a file into tables while retaining their relationships through custom-generated ID values. IE, if I had the following XML: <root> <construction> <...
1
vote
0answers
92 views

Errors while accessing Excel file using openrowset

I'm seeing the below error message while running the following T-SQL statement. select * FROM OPENROWSET( 'Microsoft.ACE.OLEDB.12.0', 'Excel 12.0;Database=123.xls', 'SELECT * FROM [Sheet1$]') ...
3
votes
2answers
209 views

How to read an excel file from a network machine using SQL?

I am trying to import some excel file data into a SQL table. I thought of using OPENROWSET for this. The issue is that the csv file is location in a different machine in the same network. How do I ...
0
votes
0answers
63 views

DB with SQL_Latin1_General_CP1_CI_AS collation and insert multi language

I have a DB with SQL_Latin1_General_CP1_CI_AS collation and we are trying to import an excel file with multiple language characters. it is not importing any characters and showing NULL. we are using ...
0
votes
0answers
249 views

Speeding up an openrowset between SQL Server and MySQL

Good morning I'm trying to import data from an MySQL table using openrowset so I can do calculations and transformations on SQL Server. The problem is that the table in question is quite big. The ...
1
vote
0answers
293 views

Using loops inside Openrowset

I'm trying to execute a query across around 200 servers using openrowset function. This function needs to execute in a loop - the query is sucessfull in SQL Server 2012 environments, but failing in ...
0
votes
0answers
171 views

CREDENTIAL mapped to Login to gain access to file resource for Bulk INSERT

According to BOL, this should be a fairly straight-forward solution to my problem, but unfortunately, it is not working and I have not been able to find much online about using CREDENTIAL mapping. ...
2
votes
0answers
147 views

SSRS - ERROR NUMBER:7357 while passing multiple value parameters using comma delimited string to stored procedure

I am working on a SSRS report to display the logins permissions in a set of databases on a specific server. the server, the logins and the databases are all parameters. NULL shows them all (logins ...
1
vote
0answers
506 views

Linked Server vs. Ad Hoc (OpenRowset / OpenDatasource) Distributed Queries

I have an application which needs to grab data from different clients' databases that reside at the client's location. So alongside their normal details such as company name, address etc, I also store ...
1
vote
1answer
14k views

Working example of OPENDATASOURCE command using SQL Authentication

I need to run some ad-hoc queries on several hundred servers that are not part of a domain. Each server has a low-privilege SQL user account that has read-only access to a few tables of interest. My ...
-2
votes
1answer
34 views

How to get many rows into one [duplicate]

I have a table like this --------------------------------------- S.no No of hours Dayorder --------------------------------------- 1 5 1 2 6 ...
1
vote
1answer
5k views

SQL Server - Linked Server - Using OPENROWSET with windows integrated security

I have seen many articles regarding OPENROWSET using integrated security (Windows Authentication), but I could not make it work for me. It is working fine using SQL Server authentication: select * ...
1
vote
0answers
79 views

Update Linked Server Provider

Is there anyway to update a linked server provider without dropping and recreating the linked server? The linked servers' provider need to be updated from SQLNCLI10 to SQLNCLI11 A coworker has ...
2
votes
1answer
666 views

How to UPDATE/DELETE/INSERT with Microsoft.ACE.OLEDB.12.0 as Linked Server in SQL Server 2012?

I need to update an Access 2003 database from SQL Server 2012 with the Microsoft.ACE.OLEDB.12.0 provider. As an administrator, everything works great. I can do Select, Insert, Update and Delete ...
1
vote
0answers
377 views

Exporting to excel from OPENROWSET with cell formatting

I am trying to generate a report from SSMS to Excel, using OpenRowSet. All is working fine, still I have to export a specific column with a barcode font. I already have the column calculated from ...
0
votes
1answer
201 views

Backup/restore using OPENDATASOURCE OR OPENROWSET

Has anyone ever successfully taken a backup or restore to another server using OPENDATASOURCE/OPENROWSET? I am not able to use linked servers so I am exploring this idea.
3
votes
1answer
23k views

distributed queries are configured to run in single-threaded apartment mode

I have sql server 2008 R2 64bit Developer's Edition Installed on my machine. And Microsoft Office 2010 Professional 32bit. I have been trying to import some Excel data from an Excel sheet into a sql ...
1
vote
1answer
561 views

type recognition with MonetDB, *create* tables from CSVs

I am confused whether you can copy records into a new table in MonetDB. The official documentation seems to talk only about copying into existing tables. I have quite a large universe of billions of ...
1
vote
0answers
683 views

Loading image from file system into SQL query using openrowset

I have a directory with images and a table in my DB with the path of each file. The main application allow me to create reports where I can display an image, so I was thinking to use a query like: ...
0
votes
1answer
612 views

SQL Server 2005 - Generate and Bulk Insert 3 million rows across 2 tables

I have a task to programmatically generate 3 million different rows of data and insert them into a database table for test purposes. I have written a VB.NET program that handles the generation of row ...
-1
votes
1answer
891 views

SQL Server : openrowset problem [closed]

I'm looking for a solution to use openrowset with variables, without an execute, so that I can use it in a table function. I know that openrowset doesn't accept '+' and that I can't call exec() to ...
3
votes
1answer
1k views

Dynamic file name for file import

I'm trying to figure out a way that I can pass a filename into a stored procedure that can import a file. However, after setting up the SQL dynamically, the object can't be found. DECLARE @fileName ...