Export arguments to handle "," in a record?

GCC Consulting gcc at optonline.net
Wed Jan 19 09:38:54 PST 2005


 

> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com 
> [mailto:filepro-list-bounces at lists.celestial.com] On Behalf 
> Of Matthew Williams
> Sent: Wednesday, January 19, 2005 12:06 PM
> To: FilePro Mailing List
> Subject: Export arguments to handle "," in a record?
> 
> As many of you have seen I am exporting a bunch of invoice 
> files.  I have setup a Word file with a merge so everything 
> looks nice and pretty and then can be e-mailed out.  However 
> I have come across some records that are a bit fussy.
> 
> My export arguments right now are -r=\n -f=, which is pretty standard.
> 
> However I came across a field that had the following 
> contents: 584 LTD,84"oak Therefore when outputted it looks 
> like: ,"584 LTD,84"oak", - a nightmare.
> 
> When I attempt to merge that in my word file it chokes as you 
> could imagine.  What would be the easiest work around?  If I 
> change the field delimiter to something that would never show 
> up in a field work?
>  Or is there a way to put quotes around any commas inside a 
> field which is what I thought it would do on its own.
> 
> Thanks!
> -Matt
> Hale Mfg.

Search the filed for a number and quote or maybe an apostrophe together.  

I'll make an assumption that the only time this occur is in description a size.
Change the quote to in. or an apostrophe to ft.

Now there are a number of ways to accomplish this.  One would be inst().  Assume
your field above is 3.
	a=instr(3,"\"") (I think that's how you would need to look for a single
quote).
      a=instr(3,"'")  (looks for the apostrophe)

A will be 0 if the " or ' is not found otherwise wise it will return the
position of the character.

Use a mid statement to replace the " or " with the proper letters.

Richard Kreiss
GCC Consulting 
	




More information about the Filepro-list mailing list