Extract table name from DDL


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Extract table name from DDL
# 1  
Old 08-28-2010
Extract table name from DDL

How can I extract table name from the different DDL statement like
ALTER TABLE
CREATE TABLE etc
Basically I have to parse thr the any of the DDL statement and verify if that DDL statement is implemented by DBA or not.
how can i do this efficiently in Kornshell scripting.
# 2  
Old 08-28-2010
Really impossible to give any suggestions without a sample of what you need to parse. Please post ten lines or so of the input text that you'll need to parse, and exactly what portions of the data, from which records (if there are multiple types of records in the data), that you'll need. It's also important to put the sample input inside of code tags (use the # button in the edit frame) so that spacing is preserved.
This User Gave Thanks to agama For This Post:
# 3  
Old 08-28-2010
Agama, I have updated the other thread(Pass a DDL statement to a KSH script) with some more details.
Appreciate if you could help me to get this working.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extract hive table structure

Hi, I need to extract only the create table structure with columns alone. for eg hive_table show create table hive_table: create table hive_table(id number,age number) OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.orc.OrcOutputFormat' LOCATION 'hdfs:/path/' I need only below ... (5 Replies)
Discussion started by: rohit_shinez
5 Replies

2. Shell Programming and Scripting

Extract table from file

I need to sort out table in a file to a format below: Input: this is a test example Cat Bee Dat 1 2 3 more Example date data Bet Cla Blaa Dat A 6 T data.. Output: this is a test (10 Replies)
Discussion started by: aydj
10 Replies

3. UNIX for Dummies Questions & Answers

Extract table from an HTML file

I want to extract a table from an HTML file. the table starts with <table class="tableinfo" and ends with next closing table tag </table> how can I do this with awk/sed... ---------- Post updated at 04:34 PM ---------- Previous update was at 04:28 PM ---------- also I want to... (4 Replies)
Discussion started by: koutroul
4 Replies

4. Shell Programming and Scripting

extract complex data from html table rows

I have bash, awk, and sed available on my portable device. I need to extract 10 fields from each table row from a web page that looks like this: </tr> <tr> <td>28 Apr</td> <td><a... (6 Replies)
Discussion started by: rickgtx
6 Replies

5. Shell Programming and Scripting

extract DDL - output every match to separate file

Hi, i want to extract the 'CREATE INDEX' or 'CREATE UNIQUE INDEX' statements from a ddl file and output each match to a separate file. i was looking around the net but couldnīt find anything. a possible sed-script could be: sed -n '/CREATE*INDEX*/,/COMMIT/p' filename.ddlbut i couldnīt find out... (11 Replies)
Discussion started by: CactusMoon
11 Replies

6. Shell Programming and Scripting

Extract Mysql table output to a log file

I need to compare the 2 mysql database tables. there are around 50 tables in each DB. my idea is in DB1 extract result select * from table1; to alog file1 in DB2 extract result select * from table1; to alog file2 now compare log file 1 file 2 pls help me out ... thanks in advance (5 Replies)
Discussion started by: kalyankalyan
5 Replies

7. Shell Programming and Scripting

Shell script to extract rows from table

I have an Employee with EID, ENAME and ESTATUS as columns in SQL. I want to extract the status of an employee and update the details if the status is 'A'. Can anyone help in writing the shell script. (1 Reply)
Discussion started by: vkca
1 Replies

8. Shell Programming and Scripting

Unix command to extract a record from a table

Suppose there is a table like the following...I just wanted to know if there is any command using which we can get the record/name of the person who joined before 2005.. Sl Name des y.o.joining 1 Ram Engineer 2001 2 Hari Doctor 2004 3 David Plumber 2005 4 Rahim painter 2007 5 gurmeet... (1 Reply)
Discussion started by: satyajit007
1 Replies

9. UNIX for Dummies Questions & Answers

extract table name from a control file

Hi, I need to extract the table name from an oracle control file which comes as the last word in the third line. Ex: LOAD DATA INFILE '/home/user/files/scott.dat' INTO TABLE SCOTT.EMP_SAL FIELDS TERMINATED BY.......... what i want to to is write the table name SCOTT.EMP_SAL to a... (2 Replies)
Discussion started by: mwrg
2 Replies

10. Shell Programming and Scripting

Extract Table from PDF

Hi Guys! I want to extract table from PDF in HTML. Can we do this using Shell script....??. Please provide me your suggestions. Any help will be highly appreciated. Thanks! (2 Replies)
Discussion started by: parshant_bvcoe
2 Replies
Login or Register to Ask a Question