Select statement with IN clause

Creating tables and queries
Post Reply
mchiem
Posts: 1
Joined: Mon Dec 24, 2007 6:03 pm

Select statement with IN clause

Post 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
RonIA
Volunteer
Posts: 139
Joined: Mon Oct 08, 2007 1:34 am
Location: Iowa USA

Re: select statement with IN clause

Post 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.
Ron from Iowa, USA
TerryE
Volunteer
Posts: 1402
Joined: Sat Oct 06, 2007 10:13 pm
Location: UK

Re: select statement with IN clause

Post 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.
Ubuntu 11.04-x64 + LibreOffice 3 and MS free except the boss's Notebook which runs XP + OOo 3.3.
Post Reply