I am trying to understand what a particular piece of source code does. The original author has written the following excerpt:
/*******************************************/
-- Inserează în tabela temporară.
/*******************************************/
INSERT INTO #tmp
(
[tip]
, [ev]
, [ap]
, [cant]
, [preț]
, [data]
)
SELECT *
FROM
OPENDATASOURCE
(
'Microsoft.Jet.OLEDB.4.0'
, 'Data Source=C:\ETU; Extended Properties="TEXT; HDR=yes; FMT=DELIMITED"'
)...[EV#csv]
When I am executing this piece of code in SSMS, I get the following error:
Msg 7314, Level 16, State 1, Line 4
The OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "(null)" does not contain the table "EV#csv". The table either does not exist or the current user does not have permissions on that table.
MSDN shows certain syntaxes for linked servers, but I do not think that the original author meant that.
There is a certain file on the hard disk which full path is C:\ETU\EV20150126000001.csv
.
I have attempted to rename the file to the EV#csv
new name, yet to no avail.
SELECT @@VERSION
says:
Microsoft SQL Server 2008 (SP2) - 10.0.4000.0 (Intel X86) Sep 16 2010 20:09:22 Copyright (c) 1988-2008 Microsoft Corporation Express Edition with Advanced Services on Windows NT 5.1 (Build 2600: Service Pack 3)