如何从包含多个选择staments的文本文件中获取表的名称 [英] how can I get name of table from text file which contain multiple select staments

查看:145
本文介绍了如何从包含多个选择staments的文本文件中获取表的名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我需要来自文本文件的表名,其中包含多个选择的staments



从Student选择Studentid,Stunm,StuClass;

Selct BookNm,booknbr,Bookcd from Book





我想要桌子的名称,即

预订和学生两个字符串数组



我该怎么做

Hi
I need name of table from text file which contain multiple select staments

select Studentid,Stunm,StuClass from Student;
Selct BookNm,booknbr,Bookcd from Book


I want name of table ie
Book and Student in two string array

How can I do that

推荐答案

阅读来自文本文件的数据并将其存储在字符串中,使用\\\
拆分字符串并将其在字符串[]数组中解析,



获取数组字符串中的选择查询,逐个循环读取查询,用Word 拆分字符串将结果存储在arrray中。在该数组中,表名将位于第1位。如果任何人需要代码意味着我将发布。
Read the data from text file and store it in string, Split the string with \n and sore it in string[] array,

Get the select Query in Array String, in for loop read query one by one, Split the string with Word From store the result in arrray. In that array table name will be in 1 st position. If any one need code means i will post.


这篇关于如何从包含多个选择staments的文本文件中获取表的名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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