I have a .sql file that has a create table query:
<<<<< some text >>>>> CREATE EXTERNAL TABLE table_name ( key1 int , key2 varchar(256), key3 int , key4 varchar(64), key5 int , ) <<<<<<< some text >>>>>>>>
Now I want just the column names in a string separated by commas and enclosed in parentheses. That is, for the above table, I want:
( key1, key2, key3, key4, key5 )
From what I thought, it is getting very very complicated. I want to script this because I have 150 such files and few of them have about 300 columns. Not a great idea to write it by hand. Can someone suggest an easier method? Thanks!