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 = 36255
interpreted = N
texte = The data I change is in fact based on the data contains within the individual record. I have already made a copy of the database and have it on my development machine - just so I don't mess up my production database
I'll give this a try, always worried about making such wholesale changes to my primary database ThanksOn Friday, August 18, 2000, Peter Ostry wrote:>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 in>fact a loop which automatically steps through all found records. Everything>between [founditems] and [/founditems] is executed record for record. You>can use [showif]'s there to define conditions for various actions. For each>run through [founditems] you can use data of the current record if>necessary.>>If you do not need individual data of the current record but rather change>all 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) wasted>time - I never understood why I have to do execute a new query for a already>loaded 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/>-------------------------------------------------------------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:
The data I change is in fact based on the data contains within the individual record. I have already made a copy of the database and have it on my development machine - just so I don't mess up my production database I'll give this a try, always worried about making such wholesale changes to my primary database ThanksOn Friday, August 18, 2000, Peter Ostry wrote:>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 in>fact a loop which automatically steps through all found records. Everything>between [founditems] and [/founditems] is executed record for record. You>can use [showif]'s there to define conditions for various actions. For each>run through [founditems] you can use data of the current record if>necessary.>>If you do not need individual data of the current record but rather change>all 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) wasted>time - I never understood why I have to do execute a new query for a already>loaded 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/>-------------------------------------------------------------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/
Dale
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:
Find all in search. (2002)
WebCat2b14MacPlugIn - [include] doesn't hide the search string (1997)
Summary layout (1997)
[WebDNA] =?windows-1252?Q?Re=3A_=5BWebDNA=5D_=5BWebDNA=5D_=5Bthisurlplusg?= (2013)
[WebDNA] Code Library (2013)
WebCat2b13MacPlugin - [math][date][/math] problem (1997)
RE: [sendmail]- bcc? (1998)
Cancel Subscription (1996)
Cache problem (2002)
quotation marks (2004)
Include a big block of text (1997)
back button loses cart (2000)
rn doesn't work on date fields (1998)
Where is f2? (1997)
Associative lookup style? + bit more (1997)
WebCat2.0 acgi vs plugin (1997)
re: How can I record purchases to a database? (1998)
WebCatalog seems to choke on large (2meg) html files. (1998)
[WebDNA] An unknown error occured // Deadlock avoided (2011)
RAM variables (1997)