the original query that i sent gives no data . i didn't know what's wronge with it
Me too. ))
-
select gro_code,grp_name from groups
-
where exists
-
(select * from groups where len(gro_code)<5)
-
The query is expected to return all or no records depending on whether [gro_code] value in ANY record of [groups] table satisfies given criteria or it doesn't. This happens because ambiguous field name - gro_code, could be related to main query and subquery source table. In this particular case Access by default associates [gro_code] with subquery source table.
To disambiguate this you need to give one of the table instance an alias name and use it to explicitly refer to the field.
-
select gro_code,grp_name from groups as groups_alias
-
where exists
-
(select * from groups where len(groups_alias.gro_code)<5)
-
But in this case a simple query .
-
select gro_code,grp_name from groups
-
where len(gro_code)<5
-
will do the same for less money.
Regards,
Fish