Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to remove some stuff from a text file??
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01654597
Message ID:
01654606
Views:
67
Likes (1)
>>I have a text file that is being created by VFP, and it has some blank dates in it - so when they do the export it looks like this:
>>
>>|01/15/2017|/ /|02/17/2016
>>
>>..the problem is that part where it says "/ /" -- well I need that to be completely blank with no spaces or anything -- so that the line in the file ends up looking like this:
>>
>>|01/15/2017||02/17/2016
>>
>>Anyone know of an easy way to do this? Or maybe a tweek to the COPY TO command that's creating the file to being with???
>>
>>Thanks :)
>
>
>select cFld, evl(dFld, .null.), etc.  from source into cursor xx
>set nulldisplay to ''
>copy to…
>
Well this seems to work

SET NULLDSIPLAY TO ''

SELECT DTOC(evl(myDateField, .null.)) FROM myTable

COPY to myfile.txt delimited with "" with character '|'

If I don't have the DTOC in there then I still end up with the / / stuff in the text file. This will get me what I need ---- thanks guys!!!
ICQ 10556 (ya), 254117
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform