Select statement with IN clause

Creating tables and queries

Select statement with IN clause

Postby mchiem » Mon Dec 24, 2007 6:08 pm

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
mchiem
 
Posts: 1
Joined: Mon Dec 24, 2007 6:03 pm

Re: select statement with IN clause

Postby RonIA » Tue Dec 25, 2007 1:23 pm

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

Re: select statement with IN clause

Postby TerryE » Tue Dec 25, 2007 8:16 pm

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


Return to Tables & Queries

Who is online

Users browsing this forum: No registered users and 2 guests