Data Extract

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hello,
i have a large dbase file which contains jobs that we
make. each job consists of a number of items which are
shown in individual rows (typically 3-4 rows per job)in
the dbase file. each row contains the job number in one of
the fields.
i want to extact all the jobs that contain a certain item.
if i write a query and set the criteria to equal that
item, i can extract all those rows that contain that item.
however what i need is to extract ALL the jobs that
contain that item, so i also need the output to contain
all the rows of each job that has that item in one of the
rows. can anyone help me write such a query.
thanks for any help
Mike
 
Sounds like your existing query will pull the lines you want, then you need
to add a new query. In that query you will include the query you just
mentioned. You will also pull in the table with all the data. Create a
link between the two to include all record from the table where the job
number is also found in the query.

Rick B


Hello,
i have a large dbase file which contains jobs that we
make. each job consists of a number of items which are
shown in individual rows (typically 3-4 rows per job)in
the dbase file. each row contains the job number in one of
the fields.
i want to extact all the jobs that contain a certain item.
if i write a query and set the criteria to equal that
item, i can extract all those rows that contain that item.
however what i need is to extract ALL the jobs that
contain that item, so i also need the output to contain
all the rows of each job that has that item in one of the
rows. can anyone help me write such a query.
thanks for any help
Mike
 
Sounds like a job for a subquery.

SELECT J.*
FROM JobsTable as J
WHERE J.JobNumber IN
(SELECT J1.JobNumber
FROM JobsTable as J1
WHERE J1.Item = "WhateverYouAreLookingFor")
 
Back
Top