sarf13 has asked for the wisdom of the Perl Monks concerning the following question:
Hi All
I am trying to retrieve sql query value. Can you tell me how i can prepare regular exp for this? I am attaching my sample file value. I just want to retrieve sql query value from the given sample file. i am also attaching the reguler exp which is not giving the expacted value
my ($start, $query) = $line =~ m/^[INSERT|CREATE](.*).+;/gi;<query> insert into tab_wk ( ran_id, prnt_id , event_id ) (select roe_id, prnt , event_id from event_links where event_id in ( 2,5 ) AND link_type = 4 AND prnt is not NULL AND crrnt_id = ? AND prnt not in (select roe_id from tab where crrnt_id <) ; ) <queryParam>CURRENT_PRCSG_TC_ID +</queryParam> </query> <query> INSERT INTO table_name (column1, column2, column3,...) VALUES (value1, + value2, value3,...); <queryParam>BATCH_ID</queryParam> <message>Loader Processing postcheck failed: There are records in roe_ +rjctn_rsn_stgng table which are not present in roe_rjctn_stgng</messa +ge> </query>
i really apricate for your kind help and knowlage sharing.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reguler Expression Problem
by davido (Cardinal) on Jul 24, 2012 at 10:42 UTC | |
|
Re: Reguler Expression Problem
by tobyink (Canon) on Jul 24, 2012 at 10:33 UTC | |
|
Re: Reguler Expression Problem
by choroba (Cardinal) on Jul 24, 2012 at 10:27 UTC | |
by sarf13 (Beadle) on Jul 24, 2012 at 10:38 UTC | |
by choroba (Cardinal) on Jul 24, 2012 at 10:45 UTC | |
by AnomalousMonk (Archbishop) on Jul 24, 2012 at 19:43 UTC | |
by Anonymous Monk on Jul 24, 2012 at 10:45 UTC |