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:

syntax question, not in online refernce (1997) [SearchString] problem with [search] context (1997) WebCatalog Technical Reference (1997) off topic - dna snipets (1997) [cart] clarification... (1997) Plugin or CGI or both (1997) Running 2 two WebCatalog.acgi's (1996) Search/sort in URL Was: GuestBook example (1997) About EMAILER and HTML Mail (2001) Include vs. lookup? (1998) NT version and O'reily's WebSite (1997) PDF Example (2003) Dummy Credit Card Number for debug? (1997) Two stores, one server (1998) Help! (2000) Attention all list readers (1997) Snippet for finding unused Header Fields in the Orders.db (2003) Whats up with emailer? (1998) creating a ShipCosts database (1997) 2 databases (1997)