Re: [WebDNA] Fails to recognize comma-separated db

This WebDNA talk-list message is from

2010


It keeps the original formatting.
numero = 105397
interpreted = N
texte = I have no argument with quote-comma-quote delimitation when it is applied to both field names and field values. But with webdna it appears that we must delimit field names differently from field values: For field names separate with comma For field values separate with quote-comma-quote Where is the consistency in this? Sincerely, Kenneth Grome > Ken > > The problem with ONLY commas is that text is not validated, ie if the value is Tremain, Stuart then it will get split into two different fields. > > If it were ,"Tremain, Stuart", then it would be held in one field as intended. > > I had great problems with a client that sent files that only validated the text fields (put "" around the text) and not the number fields so I was getting a file that looked like this: > > 1001,"text field 01","txt field 02","txt field 03, with a comma",256378,76534,"","",, > > I had to undergo a big cleaning process to get it right. See solution below > > ============================================================= > [TABLE name=CLEAN01&fields=FROM,TO] > %2C%20 > [/TABLE] > > > [TABLE name=CLEAN02&fields=FROM,TO] > %22%2C%22| > %22 > %2C| > [/TABLE] > > > [TABLE name=CLEAN03&fields=FROM,TO] > |%09 > [/TABLE] > > > [Table name=FocusReports&fields=DirectDebitId,CustNo,StoreNo,Title,FirstName,LastName,Address1,Suburb2,City,State,PostCode,Email,DOB,Sex,RightSkuNo,LeftSkuNo,RightQty,LeftQty,HealthFund,DeliveryDt,SaleAmt,Discount,RxIssueDt,RxExpiryDt,ReplnFreq,DrNo,DrTitle,DrLastName,DrFirstName,DeliverTo,DlvyAddr1,DlvySuburb2,DlvyCity,DlvyState,DlvyPcode,PayrollNo1,PayrollNo2,HomePhone,WorkPhone,MobilePhone,Country,Brand,InclSolution] > [convertchars table=CLEAN03][grep search=,&replace=][unurl][convertwords table=CLEAN02][ConvertWords table=CLEAN01][Middle StartAfter=InclSolution][url][Include file=UPLOADED-FILE-HERE][/url][/Middle][/ConvertWords][/convertwords][/unurl][/grep][/convertchars] > [/Table] > > > ============================================================= > > > > > Regards > > Stuart Tremain > IDFK Web Developments > AUSTRALIA > webdna@idfk.com.au > > > > > On 24/06/2010, at 1:24 PM, Kenneth Grome wrote: > > > Personally I think it would "make sense" to re-code webdna so that it can handle csv files that use ONLY commas as separators for both field names and field values, and so that it cal also handle csv files that use commas surrounded by quotes as separators for both field names and field values -- since these are the typical ways csv files are formatted in the industry (in my experience anyways). > > Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Fails to recognize comma-separated db (christophe.billiottet@webdna.us 2010)
  2. Re: [WebDNA] Fails to recognize comma-separated db ("Psi Prime Inc, Matthew A Perosi " 2010)
  3. Re: [WebDNA] Fails to recognize comma-separated db (Kenneth Grome 2010)
  4. Re: [WebDNA] Fails to recognize comma-separated db (christophe.billiottet@webdna.us 2010)
  5. Re: [WebDNA] Fails to recognize comma-separated db (Kenneth Grome 2010)
  6. Re: [WebDNA] Fails to recognize comma-separated db (christophe.billiottet@webdna.us 2010)
  7. Re: [WebDNA] Fails to recognize comma-separated db (Kenneth Grome 2010)
  8. Re: Fwd: [WebDNA] Fails to recognize comma-separated db ("Psi Prime Inc, Matthew A Perosi " 2010)
  9. Re: Fwd: [WebDNA] Fails to recognize comma-separated db (sal danna 2010)
  10. Re: [WebDNA] Fails to recognize comma-separated db (Stuart Tremain 2010)
  11. Re: Fwd: [WebDNA] Fails to recognize comma-separated db (Kenneth Grome 2010)
  12. RE: [WebDNA] Fails to recognize comma-separated db ("Will Starck" 2010)
  13. Fwd: [WebDNA] Fails to recognize comma-separated db (christophe.billiottet@webdna.us 2010)
  14. Re: [WebDNA] Fails to recognize comma-separated db ("Psi Prime Inc, Matthew A Perosi " 2010)
  15. Re: [WebDNA] Fails to recognize comma-separated db (christophe.billiottet@webdna.us 2010)
  16. Re: [WebDNA] Fails to recognize comma-separated db (Stuart Tremain 2010)
  17. Re: [WebDNA] Fails to recognize comma-separated db (christophe.billiottet@webdna.us 2010)
  18. Re: [WebDNA] Fails to recognize comma-separated db (Kenneth Grome 2010)
  19. Re: [WebDNA] Fails to recognize comma-separated db (christophe.billiottet@webdna.us 2010)
  20. Re: [WebDNA] Fails to recognize comma-separated db (Kenneth Grome 2010)
  21. Re: [WebDNA] Fails to recognize comma-separated db (Alex McCombie 2010)
  22. [WebDNA] Fails to recognize comma-separated db (Kenneth Grome 2010)
I have no argument with quote-comma-quote delimitation when it is applied to both field names and field values. But with webdna it appears that we must delimit field names differently from field values: For field names separate with comma For field values separate with quote-comma-quote Where is the consistency in this? Sincerely, Kenneth Grome > Ken > > The problem with ONLY commas is that text is not validated, ie if the value is Tremain, Stuart then it will get split into two different fields. > > If it were ,"Tremain, Stuart", then it would be held in one field as intended. > > I had great problems with a client that sent files that only validated the text fields (put "" around the text) and not the number fields so I was getting a file that looked like this: > > 1001,"text field 01","txt field 02","txt field 03, with a comma",256378,76534,"","",, > > I had to undergo a big cleaning process to get it right. See solution below > > ============================================================= > [TABLE name=CLEAN01&fields=FROM,TO] > %2C%20 > [/TABLE] > > > [TABLE name=CLEAN02&fields=FROM,TO] > %22%2C%22| > %22 > %2C| > [/TABLE] > > > [TABLE name=CLEAN03&fields=FROM,TO] > |%09 > [/TABLE] > > > [Table name=FocusReports&fields=DirectDebitId,CustNo,StoreNo,Title,FirstName,LastName,Address1,Suburb2,City,State,PostCode,Email,DOB,Sex,RightSkuNo,LeftSkuNo,RightQty,LeftQty,HealthFund,DeliveryDt,SaleAmt,Discount,RxIssueDt,RxExpiryDt,ReplnFreq,DrNo,DrTitle,DrLastName,DrFirstName,DeliverTo,DlvyAddr1,DlvySuburb2,DlvyCity,DlvyState,DlvyPcode,PayrollNo1,PayrollNo2,HomePhone,WorkPhone,MobilePhone,Country,Brand,InclSolution] > [convertchars table=CLEAN03][grep search=,&replace=][unurl][convertwords table=CLEAN02][ConvertWords table=CLEAN01][Middle StartAfter=InclSolution][url][Include file=UPLOADED-FILE-HERE][/url][/Middle][/ConvertWords][/convertwords][/unurl][/grep][/convertchars] > [/Table] > > > ============================================================= > > > > > Regards > > Stuart Tremain > IDFK Web Developments > AUSTRALIA > webdna@idfk.com.au > > > > > On 24/06/2010, at 1:24 PM, Kenneth Grome wrote: > > > Personally I think it would "make sense" to re-code webdna so that it can handle csv files that use ONLY commas as separators for both field names and field values, and so that it cal also handle csv files that use commas surrounded by quotes as separators for both field names and field values -- since these are the typical ways csv files are formatted in the industry (in my experience anyways). > > 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:

Signal Raised (1997) Need relative path explanation (1997) flushdatabases (1997) WebCatalog sales (1997) WebDNA Server Not Running (2005) Close-to Comparison Code (1998) Ampersand Character (&) (1997) RE: Subtotal help (1997) how to know the [LineIndex] number webcat generated during a [AddLineItem]? (2000) More on the email templates (1997) Am on the list? (1997) url question (2002) More than one db with the same namn (was: WC2f3) (1997) Grouping fields help (2004) Error: this shopping cart has already been submitted (2003) Webstar v (2001) Dieresis in [sendmail] (1999) WebCat2b12plugin - [search] is broken ... not! (1997) [DOS]/DOS query perhaps OT (2003) Emailer Problem (1998)