将单个单词导入.txt文件到数据库 [英] Import single words form a .txt file to a database

查看:169
本文介绍了将单个单词导入.txt文件到数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要将p52_24.emf导入我的test_1表中的代码列。



I need to import the p52_24.emf into my code column in my test_1 Table.

<?xml version='1.0' encoding='UTF-8' ?>
<osmChange generator="Vespucci/0.9.2r621" version="0.6">
<create><node id="-1" version="1" lat="46.6123549" lon="13.884573">
<tag k="code" v="p52_24.emf" /><tag k="erfasser" v="max_ben" />
<tag k="montage" v="normalersteher" /><tag k="name" v="schild" />
<tag k="typ" v="vz" />
</node>
</osmChange>





有没有人打造一份声明呢?

谢谢你



Does anyone knwos a statement to do that?
Thank you

推荐答案

我不确定问题是否清楚,但字符串类的split方法会将任何字符串转换为字数组s,如果你在空间上分开。然后,您可以逐个插入单词,或者您可以创建一个包含单词的XML文档,并编写一个获取该列表并插入它的proc。如果您不想复制,可以在SQL中处理,或者在将它们添加到XML之前创建一个唯一单词列表。
I am not sure the question is clear but the split method on the string class will turn any string in to an array of words, if you split on the space. Then you can insert words one by one, or you can create an XML document with words in it and write a proc that takes that list and inserts it. If you don't want duplicates, you can handle that in SQL, or by creating a list of unique words before adding them to the XML.


这篇关于将单个单词导入.txt文件到数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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