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:

[WebDNA] Connect to MS SQL (2013) Associative lookup style? (1997) question... no field names? (2002) problem: search crashes webstar (1997) Thread (1999) Fun with Dates - revisited (1997) WebCat2b12--[searchstring] bug (1997) docs for WebCatalog2 (1997) possible, WebCat2.0 and checkboxes-restated (1997) Claris HomePage messes up the code (1997) searching by date (1998) listfiles sort?! (2005) WebDNA on Fedora 5 -Apache won't start (2006) WebCatalog NT beta 18 now available (1997) Splitting a variable (2003) Searching multiple fields from one form field (1997) [WebDNA] Feature Request (2013) Template not found error messages (1997) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) Problem using # in my field names ... (1998)