I am working in ms access database2000 and my frontend is vb 6.0.

I have three tables namely:-
AREA:- areaid,areaname
ROUTE:-routeid,routeno,routename,areaids
PARTY:-partyid,lastname,firstname,address,areaid

The field areaids in ROUTE table consists of chain of areaids belonging to that particular route in this format '12,23,65,67,'

The problem is that i want to derive a query which is able to retrieve records from ROUTE and PARTY on the basis of a particular area.
response is required as early as possible.
thanks in adv.

I am working in ms access database2000 and my frontend is vb 6.0.

I have three tables namely:-
AREA:- areaid,areaname
ROUTE:-routeid,routeno,routename,areaids
PARTY:-partyid,lastname,firstname,address,areaid

The field areaids in ROUTE table consists of chain of areaids belonging to that particular route in this format '12,23,65,67,'

The problem is that i want to derive a query which is able to retrieve records from ROUTE and PARTY on the basis of a particular area.
response is required as early as possible.
thanks in adv.

Your database is designed wrong.

If an area has and belongs to many routes and a route has and belongs to many areas you need a link table:

AREA:-  1
areaid, ----------------+
areaname                |
                        |
AREA_ROUTE(link table)  |
id     0..*             |
areaid------------------+
routeid------------------------+
         0..*                  |
                               |
ROUTE:-   1                    |
routeid,-----------------------+
routeno,
routename,
areaids

Then you can find the included ones using a simple join.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.