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:

TCP Connect (2003) SOLUTION? Me know logical no need (2002) Emailer Set Up (1997) [WebDNA] Triggers.db wiped completely blank (2011) serial number dishing (1997) Need relative path explanation (1997) Database changes (1998) Download (1999) [WebDNA] WebDNA restart script (2015) Individual Tax on Items (1998) [ShowNext] (1997) taxTotal, grandTotal (1997) Permissions with 3.06 Linux (2000) upgrading (1997) Delete only one duplicate record? (2003) WCS Newbie question (1997) PIXO (1997) serial number generation (1997) Help!!!! (1997) [ShowIf] if the varieable exists (1998)