Forums
This topic is locked
Repeat Records Dynamically Driven
Posted 11 May 2005 08:28:30
1
has voted
11 May 2005 08:28:30 Gary Nutter posted:
Is it possible to repeat a record "x" number of times, based on a value in a table. For example, x=quantity, I have a one record with multiple widgits. I want each individual widgit to have a record of it own. I am using MS Access and struck out figuring that out, so i thought If I could get it to display that way, I could insert it into a table along with tracking numbers for each widgit, since every one will have a different tracking number. I would appreciate any insight...Thank you!!!
Replies
Replied 11 May 2005 19:39:25
11 May 2005 19:39:25 Chris Charlton replied:
I'm sorry, could you please clarify, I got a little lost, but it is still morning for me. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
Replied 11 May 2005 19:50:25
11 May 2005 19:50:25 Gary Nutter replied:
Absolutley...This is an inventory issue with MS Access. Here is the thought: An order is placed for 10 units. Each are large and require 10 separate boxes, thus 10 tracking numbers. The problem is that there is only one record. I do not want to have to require them to enter a single record for EVERY line item, multiple quanities are best. But, I need to find a way to break out the single record of multiple quantites into multiple records of a single quantity. I have been wrestling with doing this in access to no avail, so I thought if I could get them to display on and .asp page, I could simply insert them into a new table and build my queries relating to that table. I hope tht makes it a bit more clear. Thank you for your time.
Replied 11 May 2005 23:00:00
11 May 2005 23:00:00 Chris Charlton replied:
Okay, lemme try, I don't know your DB structure so play along with this:
One table for Orders, and one table for orderItems that link to orderID - orderItem table will have (foreign key) productID, (maybe) priceSold, shipping/tracking #, and orderID (foreign key). In your SQL, you can then use SUM on the prices sold for sub-totals, and COUNT on the items' foreignKey (orderID) to total Qty's.
How's that?
One table for Orders, and one table for orderItems that link to orderID - orderItem table will have (foreign key) productID, (maybe) priceSold, shipping/tracking #, and orderID (foreign key). In your SQL, you can then use SUM on the prices sold for sub-totals, and COUNT on the items' foreignKey (orderID) to total Qty's.
How's that?
Replied 12 May 2005 03:54:19
12 May 2005 03:54:19 Gary Nutter replied:
Well actually the point is that there is only ONE record in the detail table. The record indicates 10 as the quantity. I need to enter 10 tracking numbers for one record and I dont want to do that since 10 is just an example...it could be 100. I need to break out the record into individual records so I can have only ONE tracking number for each individual record. Does this help?
Edited by - ganutter on 12 May 2005 03:54:42
Edited by - ganutter on 12 May 2005 03:54:42