将文本文件转换为SQL Server Compact数据库(.sdf) [英] Convert text file to sql server compact database (.sdf)

查看:106
本文介绍了将文本文件转换为SQL Server Compact数据库(.sdf)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,
我有一个这种格式的文本文件:
2011/02/24动态列表显示1
-------------------------------------------------- -------------------------------------------
-------------------------------------------------- -------------------------------------------
| ItemNum | Plnt | SLoc | SL | BUn | QTY | Trans//Tfr | Qual.Insp.|限制|阻止|返回|
-------------------------------------------------- -------------------------------------------
| 06326-50014-11 | 5212 | 300A | | EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650013-0132 | 5212 | 300A | | EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650233-0202 | 5212 | 300A | | EA | 2 | 0 | 0 | 0 | 0 | 0 |
| 200-45394-0021 | 5212 | 300A | | EA | 1 | 0 | 0 | 0 | 0 | 0 |
-------------------------------------------------- -------------------------------------------
| * | | | | EA | 273 | | | | | |
-------------------------------------------------- -------------------------------------------


我可以将此值转换为PC中的sql server compact数据库吗?
我需要将要转换为sdf(sqlserver数据库)的itemnumber和QTY.

这可能吗?
如果是,我该怎么办?

或在第二种情况下;
我有一个sdf(sql server紧凑型数据库).我想将数据库中的项目编号与上述文本文件中的项目编号进行比较.如果找到匹配项,则应在另一个报告中列出该项目编号,并指出找到了该项目编号.反之亦然.
是否可以在文本文件和数据库之间进行比较,还是需要先将文本文件转换为数据库才能进行比较?

有可能吗?

有任何想法吗?

Hello,
I have a text file in this format :
02/24/2011 Dynamic List Display 1
---------------------------------------------------------------------------------------------
---------------------------------------------------------------------------------------------
| ItemNum |Plnt|SLoc|SL|BUn|QTY |Trans./Tfr|Qual.Insp.|Restricted|Blocked|Returns|
---------------------------------------------------------------------------------------------
| 06326-50014-11 |5212|300A| |EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650013-0132 |5212|300A| |EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650233-0202 |5212|300A| |EA | 2 | 0 | 0 | 0 | 0 | 0 |
| 200-45394-0021 |5212|300A| |EA | 1 | 0 | 0 | 0 | 0 | 0 |
---------------------------------------------------------------------------------------------
|* | | | |EA | 273 | | | | | |
---------------------------------------------------------------------------------------------


can i convert this values to sql server compact database in PC?
i wan the itemnumber and the QTY to be converted to sdf(sqlserver database).

Is this possible?
If yes,how may i do this?

or in second case;
i have a sdf(sql server compact database).i wan to compare the item number in the database with the item number in above text file.if match found,it should list the itemnumber in another report says that itemnumber found.and vice-versa.
is it possible to do comparison between textfile and database,or we need to convert the textfile first to database before we can do the comparison?

which is possible?

any ideas guys?

推荐答案

pwtc222,

看看此链接 [ ^ ]

希望对您有所帮助,
:)
Hi pwtc222,

Take a look on this link[^]

I hope this help,
:)


- | 06326-50014-11 | 5212 | 300A | | EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650013-0132 | 5212 | 300A | | EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650233-0202 | 5212 | 300A | | EA | 2 | 0 | 0 | 0 | 0 | 0 |
| 200-45394-0021 | 5212 | 300A | | EA | 1 | 0 | 0 | 0 | 0 | 0 |

如何比较文本文件
- | 06326-50014-11 |5212|300A| |EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650013-0132 |5212|300A| |EA | 1 | 0 | 0 | 0 | 0 | 0 |
| 06650233-0202 |5212|300A| |EA | 2 | 0 | 0 | 0 | 0 | 0 |
| 200-45394-0021 |5212|300A| |EA | 1 | 0 | 0 | 0 | 0 | 0 |

how to compare text files


这篇关于将文本文件转换为SQL Server Compact数据库(.sdf)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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