>Any ideas brethren?
>
>I am appending a CSV file into a table in a dbc. The CSV file contains dates in the format 2001/03/23 and sort codes in the format 56-12-09. Is there anything I can do at table or dbc level to remove the /s and the -s as each field is appended?
>
>What I am after is 20010323 for the date and 561209 for the sort code...
Got access to the Windows Script Host? If so consider:
oRE = CREATEOBJECT("VBScript.RegExp")
lcstring = FILETOSTR(lcfile)
oRE.Pattern = "(\d+)\/(\d+)\/(\d+)"
oRE.Global = .T.
lcstring = oRE.Replace(lcstring, "$1$2$3")
oRE.Pattern = "(\d+)\-(\d+)\-(\d+)"
lcstring = oRE.Replace(lcstring, "$1$2$3")
and save the string back using STRTOFILE().
Now admittedly, CHRTRAN() could do the same thing, but if there are any slashes or hyphens that need to be retained, they would be changed too. With this, they won't be.
George
Ubi caritas et amor, deus ibi est