Re: Delimited dilemma

2012-01-18 Thread MB Software Solutions, LLC
On 1/18/2012 8:05 PM, Frank Cazabon wrote: > Try this: > > TEXT TO m.lctext NOSHOW TEXTMERGE > "Frank","1234567.89" > ENDTEXT > > STRTOFILE(m.lcText, "Test.txt") > > CREATE CURSOR c_Import; > (UserName c(10),; > UserFee n(10,2)) > > APPEND FROM test.txt TYPE DELIMITED > > This should bring the numb

Re: Delimited dilemma

2012-01-18 Thread Frank Cazabon
Try this: TEXT TO m.lctext NOSHOW TEXTMERGE "Frank","1234567.89" ENDTEXT STRTOFILE(m.lcText, "Test.txt") CREATE CURSOR c_Import; (UserName c(10),; UserFee n(10,2)) APPEND FROM test.txt TYPE DELIMITED This should bring the number in as numeric. Frank. Frank Cazabon On 18/01/2012 06:01 PM,

RE: Delimited dilemma

2012-01-18 Thread Tracy Pearson
MB Software Solutions, LLC wrote on 2012-01-18: > VFP9SP2 > > I've got to import a CSV file. Format spelled out by vendor says > char(30), numeric(12,2), date. Ok. Great. Should be easy. File has > fields delimited by double quotes. Fine, except that the numeric fields > are also deli

Re: Delimited dilemma

2012-01-18 Thread Sytze de Boer
I would probably import the data in its raw format and have an extra field Then Replace all extra field with val(firstfld) Would that work ? On Thu, Jan 19, 2012 at 11:33 AM, MB Software Solutions, LLC < mbsoftwaresoluti...@mbsoftwaresolutions.com> wrote: > On 1/18/2012 5:18 PM, John Weller wro

Re: Delimited dilemma

2012-01-18 Thread MB Software Solutions, LLC
On 1/18/2012 5:18 PM, John Weller wrote: > Perhaps use STRTRAN() to remove all quotes then append. If I remember > correctly VFP will allocate the data types based on the table structure. I don't like this because the legitimate VARCHAR fields shouldn't have their delimiters removed, imo. Thin

RE: Delimited dilemma

2012-01-18 Thread John Weller
om] On Behalf > Of MB Software Solutions, LLC > Sent: 18 January 2012 22:01 > To: profoxt...@leafe.com > Subject: Delimited dilemma > > VFP9SP2 > > I've got to import a CSV file. Format spelled out by vendor says > char(30), numeric(12,2), date. Ok. Great. Should be

Delimited dilemma

2012-01-18 Thread MB Software Solutions, LLC
VFP9SP2 I've got to import a CSV file. Format spelled out by vendor says char(30), numeric(12,2), date. Ok. Great. Should be easy. File has fields delimited by double quotes. Fine, except that the numeric fields are also delimited by quotes. This screws up my simple APPEND FROM c:\custfi