Page 1 of 1

Select statement with IN clause

PostPosted: Mon Dec 24, 2007 6:08 pm
by mchiem
Hi,
I'm using base pointing to MS 2003 excel as the data source. I have a worksheet that was converted to a table in base, called results and it has following columns:
id, path, others

I'm trying to run a base query like this:
select * from results where path in ('a','b');

I'm getting an error that seems to indicate that the "Statement to complex"
I need to use the "IN" clause and not any other types of join, at least that's what I'm thinking. Can anyone help?

Thanks,
Mike

Re: select statement with IN clause

PostPosted: Tue Dec 25, 2007 1:23 pm
by RonIA
I'm certainly not a SQL expert but what about a simple WHERE?

select * from results where path = ('a' OR'b');
Syntax likely wrong, but you get the idea.

Re: select statement with IN clause

PostPosted: Tue Dec 25, 2007 8:16 pm
by TerryE
I think that this is a limitation of the execution engine for spreadsheets. I tried the same and got the same error message. I remember a similar limitation for the MS Jet Engine accessing spreadsheets and text files. Its has limited access modes for querying against spreadsheets. As RonIA says select * from results where path = 'a' or path = 'b' (I've corrected the syntax) works fine.