A
A Coyle
Hi
In Access 97 I would like to create a query in the following format
SELECT <various items and expressions etc here> FROM
(SELECT <various items and expresions here, WHERE clause here)
I have a query in this format in my A2000 database which works fine, in 97
however I get an "error in FROM clause".
Here is a dummy example to recreate the problem I am having:
..Create a table called t_table1.
..Give it 1 field, called myField
..Close
..Open query in design, select SQL view
..Type the following:
..SELECT myField from (SELECT myField from t_table1)
Run under A2000 = OK
Run under A97 = not OK (error in From clause)
So it looks like either
- A97 does not like nested select statements
- A97 does like nested select statements and I have the syntax wrong
If its the first (and I really hope it isnt) then I will have to rework how
I am doing things, possibly creating a dummy query def for the sub-select
statement which I later delete again. If it is the later can someone tell
me what I need to add to the syntax.
All help greatly appreciated
Regards
A
In Access 97 I would like to create a query in the following format
SELECT <various items and expressions etc here> FROM
(SELECT <various items and expresions here, WHERE clause here)
I have a query in this format in my A2000 database which works fine, in 97
however I get an "error in FROM clause".
Here is a dummy example to recreate the problem I am having:
..Create a table called t_table1.
..Give it 1 field, called myField
..Close
..Open query in design, select SQL view
..Type the following:
..SELECT myField from (SELECT myField from t_table1)
Run under A2000 = OK
Run under A97 = not OK (error in From clause)
So it looks like either
- A97 does not like nested select statements
- A97 does like nested select statements and I have the syntax wrong
If its the first (and I really hope it isnt) then I will have to rework how
I am doing things, possibly creating a dummy query def for the sub-select
statement which I later delete again. If it is the later can someone tell
me what I need to add to the syntax.
All help greatly appreciated
Regards
A