Hello Experts..
I have 3-4 C codes with Oracle SQL statements embedded. All the SQL statements starts with EXEC SQL
keyword and ends with ;
. I want to extract all the SQL statements out of these codes.
I did awk '/^[ ]EXEC SQL/,/\;/' inputFile
(I use this on all of the codes individually). That worked fine. I have couple of questions:
- How to make searching in awk (non GNU) a case insensitive affair?
EXEC SQL
orexec sql
should both be selected. - All the tables starts with "T_". How can I make all the tables upper case ones? E.g. t_table should become T_TABLE in output.
Thanks in advance !
---------- Post updated at 09:40 AM ---------- Previous update was at 09:28 AM ----------
I guess I got answer to 1st questions:
I can do something like this:
[Ee][Xx][Ee][cC] [sS][qQ][Ll]
.