Re: adding a unique value to each record in an existing andlive db

This WebDNA talk-list message is from

2002


It keeps the original formatting.
numero = 43097
interpreted = N
texte = I'll bet this would generate a unique ID value for every record: [search db=db&eqIDdatarq=[blank]] [replacefounditems]ID=[cart]_[index][/replacefounditems][numfound] [/search]Remember, the [cart] should be thought of as a string, not a number, so this should meet any unique string criteria you have. With 10,000 records, I would limit that search with a max=x and hit the template until you see a zero (just don't pass the same cart value to it each time, obviously).MikeOn Tuesday, September 3, 2002, at 10:06 PM, Kenneth Grome wrote:>> I have a database that I need to add anew ID field to. Actually the >> header has already been changed and I have started using [cart] on >> saving ot updating these records to achieve this. However, that still >> leaves over 10, >> 000 records without any content in this new field. >> >> Am I basically stuck with creating a template that does a search for >> any record with that field as blank and then updating it - one by >> one? > > No, but that's probably the easiest way to do it. I would just create > a template with a meta refresh tag in it, and make it refresh every > second, then let it run overnight or until you think it's run long > enough to replace all the blanks with [cart] values. > > > Sincerely, > Kenneth Grome >------------------------------------------------------------- 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 Web Archive of this list is at: http://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: adding a unique value to each record in an existing andlive db (Michael Davis 2002)
  2. Re: adding a unique value to each record in an existing andlive db (Kenneth Grome 2002)
  3. Re: adding a unique value to each record in an existing andlive db (dale's stuff 2002)
I'll bet this would generate a unique ID value for every record: [search db=db&eqIDdatarq=[blank]] [replacefounditems]ID=[cart]_[index][/replacefounditems][numfound] [/search]Remember, the [cart] should be thought of as a string, not a number, so this should meet any unique string criteria you have. With 10,000 records, I would limit that search with a max=x and hit the template until you see a zero (just don't pass the same cart value to it each time, obviously).MikeOn Tuesday, September 3, 2002, at 10:06 PM, Kenneth Grome wrote:>> I have a database that I need to add anew ID field to. Actually the >> header has already been changed and I have started using [cart] on >> saving ot updating these records to achieve this. However, that still >> leaves over 10, >> 000 records without any content in this new field. >> >> Am I basically stuck with creating a template that does a search for >> any record with that field as blank and then updating it - one by >> one? > > No, but that's probably the easiest way to do it. I would just create > a template with a meta refresh tag in it, and make it refresh every > second, then let it run overnight or until you think it's run long > enough to replace all the blanks with [cart] values. > > > Sincerely, > Kenneth Grome >------------------------------------------------------------- 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 Web Archive of this list is at: http://search.smithmicro.com/ Michael Davis

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:

Been meaning to ask... (1997) WebCatalog/Mac 2.1b2 - PIXO (1997) WCS Newbie question (1997) Upgrading old WebCat Database Files (1997) Weird problems with [SHOWIF]s (1997) Help! WebCat2 bug (1997) Bug Report, maybe (1997) Possible Macv2.1b2 Merge Bug (1997) Tracking (2004) Generating unique SKU from [cart] - Still Stumped... (1997) [/application] error? (1997) MATH PROBLEM (1997) Random (2000) Problems with [Applescript] (1997) WebDNAMonitor (2002) [WebDNA] Yikes, upgraded to OS Mavericks and now WebDNA not running (2013) Linux -> OS X (2002) Multiple Users.db Possible? (1997) form data submission gets truncated (1997) [Listfiles] vs Netfinder (1997)