Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
rekakannan
Starting Member
4 Posts |
Posted - 2011-02-25 : 08:43:59
|
| select A.[Name],A.SurName,--A.Phone,Substring(A.Phone,1,len(A.Phone)-1) as Phone,--A.Policyno,Substring(A.Policyno,1,len(A.Policyno)-1) as Policyno,--A.CustomerID,A.Channel,A.CityPreCode,A.Gender,Getdate()--select distinct A.phone from ( select * from OpenRowset('MSDASQL','Driver={Microsoft Text Driver (*.txt; *.csv)};DefaultDir=C:\;', 'select * from nilLive2.csv') ) A Im trying to select the csv file data from a specified path. But it shows the following error.OLE DB provider "MSDASQL" for linked server "(null)" returned message "[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified".Msg 7303, Level 16, State 1, Line 1Cannot initialize the data source object of OLE DB provider "MSDASQL" for linked server "(null)".Please any one help me. |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-02-25 : 14:00:15
|
Make sure the file exists on the specified location exactly with the same name and have full permission to the user/account through which you are logged into the SQL server . Also make sure that the file is not opened at the time while you are executing the above query .. CheersMIK |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-02-26 : 09:14:08
|
| is path local computer path or server path?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
rekakannan
Starting Member
4 Posts |
Posted - 2011-02-28 : 00:50:24
|
quote: Originally posted by MIK_2008 Make sure the file exists on the specified location exactly with the same name and have full permission to the user/account through which you are logged into the SQL server . Also make sure that the file is not opened at the time while you are executing the above query .. CheersMIK
Im sure that i kept the file in a specified location and closed the file while running the query. But still showing the same error.Any Idea?-Rekha Kannan |
 |
|
|
rekakannan
Starting Member
4 Posts |
Posted - 2011-02-28 : 00:51:57
|
quote: Originally posted by visakh16 is path local computer path or server path?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
I kept the file in a server path only. |
 |
|
|
rekakannan
Starting Member
4 Posts |
Posted - 2011-02-28 : 00:52:56
|
quote: Originally posted by visakh16 is path local computer path or server path?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/
I kept the file in a server path only. -Rekha Kannan |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-03-03 : 09:27:50
|
| What happens when you try bulk insert?MadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|
|
|