RE: TO USE SQL or something entirely different.
Sounds to me like you need to differentiate between orders and packages. If you had a table: Order_package,shipper(UPS or US Mail),weight,destination,date With all the separate orders marked as order. Then use a sum query to total all packages going to same destination on same date. Either add that to the same table with order_package set to package or to a separate table listing packages. -Original Message- From: Jeff W [mailto:[EMAIL PROTECTED]] Sent: 27 February 2001 16:29 To: CF-Talk Subject: TO USE SQL or something entirely different. I need a good starting point. I am looking to streamline our shipping procedures. Right now I generate two queries that divide out packages that are going UPS and US mail. Thats the easy part.. These insert easily into our standard UPS software. LOL What I would like to do. Each business card order is shipped pretty much separately (for drop ship purposes and the fact that not every color is produced everyday). So A UPS query may have multiple sets of cards (records) going to the same place. How in the world can I take that query, combine all the records that are the same, add their weights up and insert them back into the list only once??? I am open for suggestions. Jeff Priority Business Cards ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
RE: TO USE SQL or something entirely different.
Jeff If I understand you correctly - you could create arrays - loop through the arrays comparing whatever fields you are using to determine the same records going to the same place, do the calcs on those records - update another array with the totals for each "same place" - this new array will have one record for each same place - they loop through the new array and insert into wherever you need to insert only once. I am sorry that is confusing - I might not be understanding what you need - but Arrays are a good way to group data. Hope that helps. If you post the code you are using - it might be easier for people to help? E -Original Message- From: Jeff W [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 8:29 AM To: CF-Talk Subject: TO USE SQL or something entirely different. I need a good starting point. I am looking to streamline our shipping procedures. Right now I generate two queries that divide out packages that are going UPS and US mail. Thats the easy part.. These insert easily into our standard UPS software. LOL What I would like to do. Each business card order is shipped pretty much separately (for drop ship purposes and the fact that not every color is produced everyday). So A UPS query may have multiple sets of cards (records) going to the same place. How in the world can I take that query, combine all the records that are the same, add their weights up and insert them back into the list only once??? I am open for suggestions. Jeff Priority Business Cards ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
Re: TO USE SQL or something entirely different.
I would post code, but I havn't started coding this yet. ;-) The current code is only a short query to find out if the card is ready to ship AND if its going out UPS. That query puts its results in a file suitable for import into the UPS software. Nothing special. Right now I get doubles, triples, etc.of the same shipping destination in this query. What my goal is, is to try and take those duplicate, and triplicate, etc. records and meld them into one record, adding their weights together. The list would then only have one instance of the shipping destination and its total weight instead of numerous times. I can then import this list into the UPS software without editing the actual text file like I do now. Hope that is a little clearer. - Original Message - From: "Elizabeth Marcotte - Selphcotte Web Designs" [EMAIL PROTECTED] To: "CF-Talk" [EMAIL PROTECTED] Sent: Tuesday, February 27, 2001 12:21 PM Subject: RE: TO USE SQL or something entirely different. Jeff If I understand you correctly - you could create arrays - loop through the arrays comparing whatever fields you are using to determine the same records going to the same place, do the calcs on those records - update another array with the totals for each "same place" - this new array will have one record for each same place - they loop through the new array and insert into wherever you need to insert only once. I am sorry that is confusing - I might not be understanding what you need - but Arrays are a good way to group data. Hope that helps. If you post the code you are using - it might be easier for people to help? E -Original Message- From: Jeff W [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 27, 2001 8:29 AM To: CF-Talk Subject: TO USE SQL or something entirely different. I need a good starting point. I am looking to streamline our shipping procedures. Right now I generate two queries that divide out packages that are going UPS and US mail. Thats the easy part.. These insert easily into our standard UPS software. LOL What I would like to do. Each business card order is shipped pretty much separately (for drop ship purposes and the fact that not every color is produced everyday). So A UPS query may have multiple sets of cards (records) going to the same place. How in the world can I take that query, combine all the records that are the same, add their weights up and insert them back into the list only once??? I am open for suggestions. Jeff Priority Business Cards ~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists