I am working to get some column and table names from my .sql file.
The File is given below,which has my database data.Using this,i have to fetch the column and table names.
DROP TABLE ADRepHealthTest_TREND CASCADE CONSTRAINTS; CREATE TABLE ADRepHealthTest_TREND( TRGT_HOST varchar2(32), PORT_NO varchar2(32), SITE_NAME varchar2(64), INFO varchar2(128), MSMT_HOST varchar2(32), MSMT_TIME date, PERIOD varchar2(32), FAILS_COUNT_MIN Number(20,4) NOT NULL, FAILS_COUNT_MAX Number(20,4) NOT NULL, FAILS_COUNT_STCNT varchar2(32) NOT NULL, TOTAL_COUNT_MIN Number(20,4) NOT NULL, TOTAL_COUNT_MAX Number(20,4) NOT NULL, TOTAL_COUNT_STCNT varchar2(32) NOT NULL, PERCENT_COUNT_MIN Number(20,4) NOT NULL, PERCENT_COUNT_MAX Number(20,4) NOT NULL, PERCENT_COUNT_STCNT varchar2(32) NOT NULL);
I read the file perfectly using Scanner class.The entire data have been read perfectly.
Now i need the column and table names alone from that parsed data.I struggled lot to tokenize or get the column & table names perfectly.
Guide me to proceed ahead !!!