Re: Update DB

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 40358
interpreted = N
texte = Basically, you need to read through your uploaded flat file as a database, and search your existing database for each SKU. If not found, add it. If found, ignore it.If your uploaded file does not already contain a header line, you either need to add one or create a .hdr file with the same name as your uploaded file.The code for adding new entries would look something like this:[search db=uploaded.db&neCustomer_skudatarq=_bogus_&rank=off][founditems] [search db=existing.db&eqCustomer_skudatarq=[url][Customer_sku][/url]] [showif [numfound]>0] [append db=existing.db][!] [/!]Customer_sku=[url][Customer_sku][/url]&[!] [/!]Account_code=[url][Account_code][/url]&[!] [/!]Customer_Product_code=[url][Customer_Product_code][/url][!] [/!][/append] [/showif] [/search] [/founditems][/search]- BrianAt 8:25 AM +0000 11/27/2001, Jan Pettersen wrote: >All, >I have an application where I can convert and upload flat files from an >SQL db to my webserver. In the process of doing so I would like to be able >to compare the two so that only new entries are allowed into the exsisting >file on the web. >The files do only have three columns each: >Customer_sku, Account_code and Customer_Product_code >How can I go about doing so? > >Suggestions will be much appreciated! > >Jan------------------------------------------------------------- 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: Update DB (Brian Fries 2001)
  2. Update DB (Jan Pettersen 2001)
Basically, you need to read through your uploaded flat file as a database, and search your existing database for each SKU. If not found, add it. If found, ignore it.If your uploaded file does not already contain a header line, you either need to add one or create a .hdr file with the same name as your uploaded file.The code for adding new entries would look something like this:[search db=uploaded.db&neCustomer_skudatarq=_bogus_&rank=off][founditems] [search db=existing.db&eqCustomer_skudatarq=[url][Customer_sku][/url]] [showif [numfound]>0] [append db=existing.db][!] [/!]Customer_sku=[url][Customer_sku][/url]&[!] [/!]Account_code=[url][Account_code][/url]&[!] [/!]Customer_Product_code=[url][Customer_Product_code][/url][!] [/!][/append] [/showif] [/search] [/founditems][/search]- BrianAt 8:25 AM +0000 11/27/2001, Jan Pettersen wrote: >All, >I have an application where I can convert and upload flat files from an >SQL db to my webserver. In the process of doing so I would like to be able >to compare the two so that only new entries are allowed into the exsisting >file on the web. >The files do only have three columns each: >Customer_sku, Account_code and Customer_Product_code >How can I go about doing so? > >Suggestions will be much appreciated! > >Jan------------------------------------------------------------- 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/ Brian Fries

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:

WebCatalog vs. Cold Fusion (1998) Quitting WebMerchant ? (1997) errormessages.db (1997) Web Catalog 2 demo (1997) [SHOWIF AND/OR] (1997) [WebDNA] Scripts directory - IIS 5 and WebDNA 6.2 (2011) Is there an alternative to emailer? (1999) New user...how do I create URLs from form fields? (2000) WebCat2b13MacPlugIn - [include] doesn't allow creator (1997) [format 40s]text[/format] doesn't work (1997) MasterCounter Weirdness (1997) Gil's in the lead (1999) Bug or syntax error on my part? (1997) In Digest Dijon (2000) Great product and great job ! (1997) Another question (1997) Stumpted Again (1997) WebCat2b12plugin - [search] is broken ... not! (1997) WebCat with WebTen (1998) WebTEN vs webSTAR (1998)