我可以从查询中导出以访问文本文件而不用引号括起字符串吗
Can I export from a query in access to a text file without wrapping strings in quotes
我正在尝试通过查询从访问导出到文本文件
select CustomerName
into [Text;FMT=TabDelimited;HDR=NO;DATABASE=C:\Temp\;].CustomerList.txt
from Customer
但是,每一行都用双引号引起来。有没有办法关闭引号(我只设置一列),或者我可以使用自定义引号字符(例如将其设置为空白)?
方法一
您必须在要导出的目录中手动添加 schema.ini
在你的情况下,它应该包含:
TextDelimiter="none"
方法二
另一种方法是使用 TransferText method 和 :
SpecificationName Optional Variant. A string expression that's the
name of an import or export specification you've created and saved in
the current database. For a fixed-width text file, you must either
specify an argument or use a schema.ini file, which must be stored in
the same folder as the imported, linked, or exported text file. To
create a schema file, you can use the text import/export wizard to
create the file. For delimited text files and Microsoft Word mail
merge data files, you can leave this argument blank to select the
default import/export specifications.
对于您的导出规范,这是一个一次性操作,您将使用该向导,那里有一个 "advanced" 按钮,它带有一个菜单,您可以在其中将文本分隔符设置为空。
Google 是你的朋友。你现在已经有足够的线索来解决这个问题了。
我正在尝试通过查询从访问导出到文本文件
select CustomerName
into [Text;FMT=TabDelimited;HDR=NO;DATABASE=C:\Temp\;].CustomerList.txt
from Customer
但是,每一行都用双引号引起来。有没有办法关闭引号(我只设置一列),或者我可以使用自定义引号字符(例如将其设置为空白)?
方法一
您必须在要导出的目录中手动添加 schema.ini
在你的情况下,它应该包含:
TextDelimiter="none"
方法二
另一种方法是使用 TransferText method 和 :
SpecificationName Optional Variant. A string expression that's the name of an import or export specification you've created and saved in the current database. For a fixed-width text file, you must either specify an argument or use a schema.ini file, which must be stored in the same folder as the imported, linked, or exported text file. To create a schema file, you can use the text import/export wizard to create the file. For delimited text files and Microsoft Word mail merge data files, you can leave this argument blank to select the default import/export specifications.
对于您的导出规范,这是一个一次性操作,您将使用该向导,那里有一个 "advanced" 按钮,它带有一个菜单,您可以在其中将文本分隔符设置为空。
Google 是你的朋友。你现在已经有足够的线索来解决这个问题了。