如何导入文本文件以访问并为表分配值? [英] How to import text file to access and assign value to table?

查看:59
本文介绍了如何导入文本文件以访问并为表分配值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本文件,我想阅读并将部件分配给MS Access表中的某个字段


当您查看此文件时,您将看到带有相应信息的数字Ex :120A。 CMPBLLBK我想要120A被叫?位置?和?CMPBLLBK?填充在那个位置。


基本上当它被读入访问时,我想要一个表格

,其中包含名为[TSR Number] [Type Action]的字段[服务类型] [网络要求]等


任何帮助将不胜感激。



TcossDocument2有我将阅读的格式

TcossDocument是一个实际文件



I have a text file that I want to read and assign parts to a certain field in MS Access table

When you look at this file you will see numbers with corresponding info Ex: 120A. CMPBLLBK I want to have 120A be called ?Location? and ?CMPBLLBK? be populated in that location.

Basically when it is read into access I want a table that
that has fields named [TSR Number] [Type Action][TYPE OF SERVICE][NETWORK REQUIREMENTS],etc


Any help would be appreciated.


TcossDocument2 has the format in which I will be reading
TcossDocument is an actual document

附加文件
< a href =https://bytes.com/attachments/attachment/4842d1298890932/tcossdocument2.txt> TcossDocument2.txt (706字节,253次观看次数)
TcossDocument.txt (1.5 KB,327 views)
Attached Files
(1.5 KB, 327 views)

推荐答案

这将打开一个文件,把它读成文本字符串。然后你可以从那里操作字符串来得到你需要的东西。

This will open a file and read it into a textstring. You can then manipulate the string from there to get what you need.

展开 | 选择 | Wrap | 行号


谢谢你的快速响应 - 您能否展示或指导我如何编写第一行来创建表方面。之后我可以关注


基本上当它被读入访问时,我想要一个表格

,其中包含名为[TSR Number] [Type Action]的字段[服务类型] [网络要求]和来自该字段中文本的相应信息,即在阅读文本[TSR号码]之后将具有EJ13JAN102064。填充在其中
Thank You for your quick response-Can you show or guide me how I would write the first line to create the table aspect. I can follow after that

Basically when it is read into access I want a table that
that has fields named [TSR Number] [Type Action][TYPE OF SERVICE][NETWORK REQUIREMENTS] and the corresponding information from the text in that field i.e. After reading the text [TSR Number] would have "EJ13JAN102064" populated in it


您是否需要基于每个文件创建表?如果表已经存在会发生什么?追加或覆盖?
Do you need to create the tables on a per file basis? What should happen if the table allready exists? Append or overwrite?


这篇关于如何导入文本文件以访问并为表分配值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆