Re: automatically updating all records, one by one in a db
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 36249
interpreted = N
texte = on 17.08.2000 13:16, Dale at stuff@colony.net wrote:> I have to update some information in each record of a live production> database. There are a couple of different fields that need to be updated and I> want to make sure I do things correctly as to not mess up my db.Make a copy first :)> So how do I do a search, with results for only 1 at a time, make the changes,> then proceed to the next record that needs to be updated?You don't have to search for each record individually. [founditems] is infact a loop which automatically steps through all found records. Everythingbetween [founditems] and [/founditems] is executed record for record. Youcan use [showif]'s there to define conditions for various actions. For eachrun through [founditems] you can use data of the current record ifnecessary.If you do not need individual data of the current record but rather changeall or a selection of records by given criteria, a search is not necessary.Use [replace], which is actually query and replace in one command.--btw - to change fields within a [founditems] loop you have to use [replace]either. Since [replace] containes a search this is (in my opinion) wastedtime - I never understood why I have to do execute a new query for a alreadyloaded record... Peter-------------------------------------------------------------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:
on 17.08.2000 13:16, Dale at stuff@colony.net wrote:> I have to update some information in each record of a live production> database. There are a couple of different fields that need to be updated and I> want to make sure I do things correctly as to not mess up my db.Make a copy first :)> So how do I do a search, with results for only 1 at a time, make the changes,> then proceed to the next record that needs to be updated?You don't have to search for each record individually. [founditems] is infact a loop which automatically steps through all found records. Everythingbetween [founditems] and [/founditems] is executed record for record. Youcan use [showif]'s there to define conditions for various actions. For eachrun through [founditems] you can use data of the current record ifnecessary.If you do not need individual data of the current record but rather changeall or a selection of records by given criteria, a search is not necessary.Use [replace], which is actually query and replace in one command.--btw - to change fields within a [founditems] loop you have to use [replace]either. Since [replace] containes a search this is (in my opinion) wastedtime - I never understood why I have to do execute a new query for a alreadyloaded record... Peter-------------------------------------------------------------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/
Peter Ostry
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:
[include] affect on filepaths for links? (1997)
[OT] - See my site? (2004)
Creating comums (1998)
Maybe off topic but how to charge (1997)
How To question on setting up downloads (1997)
MacAuthorize order data fields WAS:How To question... (1997)
Editor? (2000)
2.0Beta Command Ref (can't find this instruction) (1997)
Re1000001: Setting up shop (1997)
WebCatalog can't find database (1997)
PCS Frames (1997)
Help formatting search results w/ table (1997)
Great product and great job ! (1997)
Error:Too many nested [xxx] contexts (1997)
[math date] with non-US date format (2000)
Checkbox question (1997)
Help name our technology! I found it (1997)
New public beta available (1997)
I forgot (1998)
search for all (1998)