Re: Reindexing a db with duplicate numbers...
This WebDNA talk-list message is from 1999
It keeps the original formatting.
numero = 25555
interpreted = N
texte = don't use replace:[copyfile from=orders.db&to=C_Y_A.db][search db=orders.db&neordernumdata=[blank]&asmoddatesort=1&asmodtimesort=2][writefile temp.db]sku
headerfieldsifneeded[founditems][index][your][fields][here][/founditems][/writefile][flushdatabases][copyfile from=temp.db&to=orders.db]HTH-AaronWill Starck wrote:> Here's the situation:>> I [append] all my orders to an orders.db. Each order is supposed to have a> unique ordernumber, which is appended to orders.db as field ordernum.>> Due to a bug in one of my templates, some of these orders now have duplicate> ordernumbers. I thought I'd correct this with something like the following> code in a template:>> [search db=orders.db&neordernumdata=[blank]&asmoddatesort=1&asmodtimesort=2]> [founditems]> [replace db=orders.db&eqordernumdata=[ordernum]]ordernum=[index][/replace]> [/founditems]> [/search]>> Of course, that doesn't work. Anyone have a suggestion as to what search> criteria I can put in the [replace] to make this work? All I want to do is> sequentially renumber all the records in this db...>> Thanks,>> Will Starck> TigerNet Technologies, Inc.>> -------------------------------------------------------------> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.> To end your Mail problems go to .>> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to -------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Associated Messages, from the most recent to the oldest:
don't use replace:[copyfile from=orders.db&to=C_Y_A.db][search db=orders.db&neordernumdata=[blank]&asmoddatesort=1&asmodtimesort=2][writefile temp.db]skuheaderfieldsifneeded[founditems][index][your][fields][here][/founditems][/writefile][flushdatabases][copyfile from=temp.db&to=orders.db]HTH-AaronWill Starck wrote:> Here's the situation:>> I [append] all my orders to an orders.db. Each order is supposed to have a> unique ordernumber, which is appended to orders.db as field ordernum.>> Due to a bug in one of my templates, some of these orders now have duplicate> ordernumbers. I thought I'd correct this with something like the following> code in a template:>> [search db=orders.db&neordernumdata=[blank]&asmoddatesort=1&asmodtimesort=2]> [founditems]> [replace db=orders.db&eqordernumdata=[ordernum]]ordernum=[index][/replace]> [/founditems]> [/search]>> Of course, that doesn't work. Anyone have a suggestion as to what search> criteria I can put in the [replace] to make this work? All I want to do is> sequentially renumber all the records in this db...>> Thanks,>> Will Starck> TigerNet Technologies, Inc.>> -------------------------------------------------------------> Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.> To end your Mail problems go to .>> This message is sent to you because you are subscribed to> the mailing list .> To unsubscribe, E-mail to: > To switch to the DIGEST mode, E-mail to -------------------------------------------------------------Brought to you by CommuniGate Pro - The Buzz Word Compliant Messaging Server.To end your Mail problems go to .This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to
Aaron Lynch
DOWNLOAD WEBDNA NOW!
Top Articles:
Talk List
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...
Related Readings:
Applescript, WebDNA, and PDF (1997)
More Shopping Cart Problems (2000)
Dummy Credit Card Number for debug? (1997)
shipcost (1997)
Subtotal Not Calculated on Invoice.html (1998)
Running 2 two WebCatalog.acgi's (1996)
& Aftermath (1999)
Non-Cart Files in Shopping Cart Folder (1997)
Location of Webcat site in folder hierarchy (1997)
The beginning (1997)
WebCat2_Mac RETURNs in .db (1997)
Same Database needed on two machines (2002)
WebCommerce: Folder organization ? (1997)
Change to UPPERCASE (2000)
Cancel Subscription (1996)
Running WebCat from a CD-ROM (1997)
https validation (2001)
calender with business days (1998)
[sendmail] questions... (1997)
Just Testing (1997)