主题:各位老师好!请教一个关于dbf表字段输出为txt文档,使用chr(13)后,文档后面有一个问号
各位老师好!请教一个关于dbf表字段输出为txt文档,使用chr(13)后,文档后面有一个问号。输出的格式如下
a|b|c|........|p?
而我要的格式是
a|b|c|........|p
我的代码是这么写的:
CLOSE ALL
RELEASE ALL
USE 回盘模板
DELETE ALL
PACK
APPEND FROM 合成后的.txt DELIMITED WITH CHARACTER "|"
replace ALL a WITH ALLTRIM(a)
replace ALL b WITH ALLTRIM(b)
replace ALL c WITH ALLTRIM(c)
replace ALL d WITH ALLTRIM(d)
replace ALL e WITH ALLTRIM(e)
replace ALL f WITH ALLTRIM(f)
replace ALL g WITH ALLTRIM(g)
replace ALL h WITH ALLTRIM(h)
replace ALL i WITH ALLTRIM(i)
replace ALL j WITH ALLTRIM(j)
replace ALL k WITH ALLTRIM(k)
replace ALL l WITH ALLTRIM(l)
replace ALL m WITH ALLTRIM(m)
replace ALL n WITH ALLTRIM(n)
replace ALL o WITH ALLTRIM(o)
replace ALL p WITH ALLTRIM(p)
replace ALL a WITH a-"|"
replace ALL b WITH b-"|"
replace ALL c WITH c-"|"
replace ALL d WITH d-"|"
replace ALL e WITH e-"|"
replace ALL f WITH f-"|"
replace ALL g WITH g-"|"
replace ALL h WITH h-"|"
replace ALL i WITH i-"|"
replace ALL j WITH j-"|"
replace ALL k WITH k-"|"
replace ALL l WITH RIGHT(l,LEN(l)-4)
replace ALL l WITH l-"|"
replace ALL m WITH m-"|"
replace ALL n WITH n-"|"
replace ALL o WITH o-"|"
replace ALL p WITH p-"否"
BROWSE
LIST FIELDS a,b,c,d,e,f,g,h,i,j,l,m,n,o,p,CHR(13) OFF NOCONSOLE TO FILE 合成.txt
如果使用
*!* SET CONSOLE OFF
*!* SET ALTERNATE TO mytext.txt
*!* SET ALTERNATE ON
*!* SCAN
*!* ?a,b,c,d,e,f,g,h,i,j,l,m,n,o,p,CHR(13)
*!* ENDSCAN
*!* SET ALTERNATE TO
*!* SET ALTERNATE OFF
也是一样的效果。
请问如何将这个问号去掉呢?或者说,如何输出不带问号的字符文档呢?
如果不用chr(13),文档的格式就是乱的,很纠结。
请教各位老师,小弟在此谢过了!
a|b|c|........|p?
而我要的格式是
a|b|c|........|p
我的代码是这么写的:
CLOSE ALL
RELEASE ALL
USE 回盘模板
DELETE ALL
PACK
APPEND FROM 合成后的.txt DELIMITED WITH CHARACTER "|"
replace ALL a WITH ALLTRIM(a)
replace ALL b WITH ALLTRIM(b)
replace ALL c WITH ALLTRIM(c)
replace ALL d WITH ALLTRIM(d)
replace ALL e WITH ALLTRIM(e)
replace ALL f WITH ALLTRIM(f)
replace ALL g WITH ALLTRIM(g)
replace ALL h WITH ALLTRIM(h)
replace ALL i WITH ALLTRIM(i)
replace ALL j WITH ALLTRIM(j)
replace ALL k WITH ALLTRIM(k)
replace ALL l WITH ALLTRIM(l)
replace ALL m WITH ALLTRIM(m)
replace ALL n WITH ALLTRIM(n)
replace ALL o WITH ALLTRIM(o)
replace ALL p WITH ALLTRIM(p)
replace ALL a WITH a-"|"
replace ALL b WITH b-"|"
replace ALL c WITH c-"|"
replace ALL d WITH d-"|"
replace ALL e WITH e-"|"
replace ALL f WITH f-"|"
replace ALL g WITH g-"|"
replace ALL h WITH h-"|"
replace ALL i WITH i-"|"
replace ALL j WITH j-"|"
replace ALL k WITH k-"|"
replace ALL l WITH RIGHT(l,LEN(l)-4)
replace ALL l WITH l-"|"
replace ALL m WITH m-"|"
replace ALL n WITH n-"|"
replace ALL o WITH o-"|"
replace ALL p WITH p-"否"
BROWSE
LIST FIELDS a,b,c,d,e,f,g,h,i,j,l,m,n,o,p,CHR(13) OFF NOCONSOLE TO FILE 合成.txt
如果使用
*!* SET CONSOLE OFF
*!* SET ALTERNATE TO mytext.txt
*!* SET ALTERNATE ON
*!* SCAN
*!* ?a,b,c,d,e,f,g,h,i,j,l,m,n,o,p,CHR(13)
*!* ENDSCAN
*!* SET ALTERNATE TO
*!* SET ALTERNATE OFF
也是一样的效果。
请问如何将这个问号去掉呢?或者说,如何输出不带问号的字符文档呢?
如果不用chr(13),文档的格式就是乱的,很纠结。
请教各位老师,小弟在此谢过了!