0

I'm using ole db as follows:

_adapter = new OleDbDataAdapter(command);
_adapter.Fill(Set);

command.commandtext is populated with:

"SELECT [Roster$].[ID],[Roster$].[Name],[Roster$].[Level],[Events$].[Name],[Scores$].[Score] 
FROM [Roster$] 
Inner Join [Scores$] on [Scores$].[CompetitorId] = [Roster$].[ID] 
Inner Join [Events$] on [Events$].[ID] = [Scores$].[EventId] 
where [Roster$].[ID] = 1"

The error I'm getting is:

Syntax error (missing operator) in query expression '[Scores$].[CompetitorId] = [Roster$].[ID] Inner Join [Events$] on [Events$].[ID] = [Scores$].[EventId]'.

Not sure where I'm going wrong.

Edit: I'm trying to connect to an Excel Database BTW

John Saunders
  • 160,644
  • 26
  • 247
  • 397
Tbonechk27
  • 140
  • 1
  • 5
  • What database are you connected to? – Gordon Linoff Dec 22 '14 at 01:41
  • You need some extra parens. OLEDB needs some help figuring out where the joins belong. Check out http://stackoverflow.com/questions/23626514/how-to-do-an-inner-join-in-ssis-excel-source-component – dbugger Dec 22 '14 at 01:57

0 Answers0