Re: Renumbering Database Records

This WebDNA talk-list message is from

1999


It keeps the original formatting.
numero = 23686
interpreted = N
texte = >Hi, > > How can I renumber the records in a database? I have a database with a >field ID. I want to go throught the database, possibly sorting on some >other field, and number the records 1,2,3,4,... etc so I can have a >unique ID for each record. After that, for example, I can use this ID to >delete a record.The easiest way is to begin my using the sku=[cart] parameter in your append context when creating each and every new record, like this:[append db=some.db]sku=[cart]&field1=somevalue&etc...[/append]Then every record in your db will have a unique sku value, which means you can use either a [search] or a [lookup] later to retrieve the specific record you need. Or if your goal is to delete a specific record, you can use [delete db=some.db&eqskudata=something] to delete the record that has something in the sku field ... :)Sincerely, Ken Grome WebDNA Consultant Associated Messages, from the most recent to the oldest:

    
  1. Re: Renumbering Database Records (PCS Technical Support 1999)
  2. Re: Renumbering Database Records (Kenneth Grome 1999)
  3. Renumbering Database Records (Phil Marshall 1999)
>Hi, > > How can I renumber the records in a database? I have a database with a >field ID. I want to go throught the database, possibly sorting on some >other field, and number the records 1,2,3,4,... etc so I can have a >unique ID for each record. After that, for example, I can use this ID to >delete a record.The easiest way is to begin my using the sku=[cart] parameter in your append context when creating each and every new record, like this:[append db=some.db]sku=[cart]&field1=somevalue&etc...[/append]Then every record in your db will have a unique sku value, which means you can use either a [search] or a [lookup] later to retrieve the specific record you need. Or if your goal is to delete a specific record, you can use [delete db=some.db&eqskudata=something] to delete the record that has something in the sku field ... :)Sincerely, Ken Grome WebDNA Consultant Kenneth Grome

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:

Discount solution? (1998) Rumpus/Typhoon modules included in Typhoon ... (1997) [WebDNA] OSX users (2009) SMSI: Forged email addresses on the talk list ... (2002) blank page from template (1997) [WriteFile] problems (1997) Location of Webcat site in folder hierarchy (1997) Range compare... (2000) help needed: Non-english characters in WebCatalog (1997) WC2b15 File Corruption (1997) [OT] HTML EMAIL program wanted (1999) Aquick question about replace (1999) [WebDNA] Virtual server (2011) 4.x in production update (2000) WebCatalog studio (2000) Temp DBs (2007) WebCat2 - many [carts] on one template page? (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) strange math (2004) Re:Emailer problem....still (1997)