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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-01-31 : 21:35:14
|
scott writes "Hi,
Is it possible to use INNER JOINs when you are working with .csv files? ie, i have setup the odbc text driver and have 4 .csv files in the directory (the files become the equivalent of tables and the folder is the database). You cannot set a primary key for a csv file. but i have tried to use INNER JOINs anyway based on the structure of the tables as they once were in access (at which time the query did work).
here is the query (take off wordwrap and it should look reasonable):
strsql = "SELECT [report_Group.csv].GrpName, [report_Cases.csv].[Assigned First Name] & ' ' & [report_cases.csv].[Assigned Last Name] AS assigned_fullname, [report_Cases.csv].[Case Severity], [report_Cases.csv].[Case ID], [report_Cases.csv].Subject, [report_Cases.csv].[Case Status], [report_Cases.csv].[Date Entered], Now()-[report_Cases.csv].[Date Entered] AS Age FROM [report_Cases.csv] INNER JOIN ([report_Group.csv] INNER JOIN [report_Members.csv] ON [report_Group.csv].GrpID = [report_Members.csv].[GrpID]) ON ([report_Cases.csv].[Assigned Last Name] = [report_Members.csv].[Last Name]) AND ([report_Cases.csv].[Assigned First Name] = [report_Members.csv].[First Name]) WHERE ((([report_Cases.csv].[Case Status])<>'resolved' And ([report_Cases.csv].[Case Status])<>'review pending')) ORDER BY [report_Group.csv].GrpName, [report_Cases.csv].[Case Severity], [report_Cases.csv].[Case ID];"
the error i get:
=================== Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Text Driver] Syntax error in JOIN operation.
? ================
even tho i get a syntax error it did work when it was in access (as to why i took it out of access is too long to explain) any suggestions greatly appreciated. " |
|
|
|
|
|