Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append Table Please Help

Status
Not open for further replies.

gbrigman

IS-IT--Management
Mar 7, 2002
13
US
I tried to post this in the past. I probably wasn't clear enough. I'll try again. Here's the setup.

TABLE A INMAST
FPARTNO FBSIZE
100 10
101 20
102 20

TABLE B JOBS
JOBNO FPARTNO FMAKE
25 100 20
26 102 40
27 101 100
28 103 10

TABLE C TICKETS
JOBNO TICKETNO FQTY
25 000001 10
25 000002 10
26 000003 20
26 000004 20

Table A holds part information
Table B in input by hand for each job
Table C is generated from information contained in A & B.
TICKETS.JOBNO=JOBS.JOBNO
TICKETS.TICKETNO=(AUTONUMBER)
TICKETS.FQTY=JOBS.FMAKE/INMAST.FBSIZE

The problem:
I can't get a query to generate the multiple rows required in table C.
 
INSERT INTO Tickets ( JobNo, Fqty )
SELECT Jobs.JobNo, [jobs].[fmake]/[inmast].[fbsize]
FROM Jobs INNER JOIN InMast ON Jobs.FPartNo = InMast.fPartNo;
 
I tried your suggestion. It just gives me the number of bundles. What I need is to get it to run the query x times where x=the number of bundles, appending the table each time it runs.
 
Any help on this would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top