Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/71.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/variables/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将文本文件中的数据字段存储到SQL表中_Sql_Database_Text_Store - Fatal编程技术网

将文本文件中的数据字段存储到SQL表中

将文本文件中的数据字段存储到SQL表中,sql,database,text,store,Sql,Database,Text,Store,因此,我有一个文本文件,可以解析我的XML文件: Current Element :property name : pkgname value : environment : Current Element :property name : execFilename value : ${progdir}\execFilename environment : Current Element :property name : sc_folder value : xxx_folder env

因此,我有一个文本文件,可以解析我的XML文件:

Current Element :property
name : pkgname
value : 
environment : 

Current Element :property
name : execFilename
value : ${progdir}\execFilename
environment : 

Current Element :property
name : sc_folder
value : xxx_folder
environment : 


Current Element :taskdef
resource : net/sf/antcontrib/antlib.xml

Current Element :var
name : install_pkg
value : ${basedir}\energia-1.6.10E18-windows.zip

Current Element :var
name : use64bit
value : true

Current Element :var
name : progdir
value : C:\Program Files
我想将此类文件存储到我的SQL表中,我在其中创建了:

CREATE TABLE Property
(
    Name varchar(max),
    Val varchar(max)
);

CREATE TABLE Taskdef
(
    Resources varchar(max)
);

CREATE TABLE Var
(
    Name varchar(max),
    Val varchar(max)
);

如何将数据按其当前字段存储到表的正确位置,例如,如果我查找“当前元素:属性”并希望存储其属性“名称”,那么在表“属性”下,我希望将“pkgname”存储到列“名称”中。

这是microsoft sql server吗?是否要在数据库服务器中执行此操作?这是一个transac sql代码?我正在使用Firebird sql数据库。我没有使用数据库服务器的任何经验。我正在编写代码,以便在Firebird数据库的GUI FlameRobin中创建表。