Ugh...what's wrong with this????
COPY TO [g:\temp\3lowercounties] FIELDS EXCEPT filler* TYPE CSV
DELIMITED WITH ["]
It's the DELIMITED part that's throwing the error. I wanted to embed
quotes around the fields because some fields are getting interpreted as
numbers where they're not supposed to be. For example 07008E00000 shows
in Excel as 7008. Even after I format the Column's cells to be TEXT, it
doesn't respect the true character string of the cell (probably because
by that point, it's already been neutered).
Here's my code:
CLOSE ALL
CLEAR ALL
LOCAL lcText as String, lcTarget as String, lnFiles as Integer, lnLoop
as Integer
LOCAL ARRAY laFiles[1]
SET DEFAULT TO [G:\temp\TLC vs DHMH]
lcTarget = [c:\crap\master.txt]
lnFiles = ADIR(laFiles,"*.TXT")
STRTOFILE("",lcTarget) && start
FOR lnLoop = 1 TO lnFiles
lcText = FILETOSTR(laFiles[lnLoop,1])
STRTOFILE(lcText,lcTarget,1) && append file to master
ENDFOR
CREATE CURSOR MyCursor ;
(MCOProv c(9), ;
filler1 c(5), ;
FQHCProv c(9), ;
filler2 c(5), ;
TypeOfService c(7), ;
filler3 c(7), ;
PatMANum c(13), ;
filler4 c(1), ;
PatName c(42), ;
SvcDate c(10), ;
filler5 c(4), ;
ProcCode c(5), ;
filler6 c(9), ;
digit2 c(2), ;
filler7 c(12), ;
begdate c(10), ;
filler8 c(4), ;
enddate c(10), ;
filler9 c(4), ;
patid c(11))
APPEND FROM (lcTarget) TYPE SDF
COPY TO [g:\temp\3lowercounties] FIELDS EXCEPT filler* TYPE CSV &&
DELIMITED WITH ["]
Ideas appreciated...thanks!
--Mike
--
Mike Babcock, MCP
MB Software Solutions, LLC
President, Chief Software Architect
http://mbsoftwaresolutions.com
http://fabmate.com
http://twitter.com/mbabcock16
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message:
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.