Thanks all for the help.
As of now, I have re-wrote my sql's to get the desired results however the sql is not effective (though giving the correct result set)
My Data was
C2 C2 (Modified)
My requirement was to find only New records. So i got my result by running a small query of records present in table 2 which are not present in Table 1.
However same was not working fine in perl.
I rewrote my sql in such a way that I used minus first which gave me C2 and C3 records and then i again minus those records which are present in both. In short find out those records which are changed or new and then removed the changed records. So i got the new records.
Now with respect to solutions provided by all of you, I got to know the Report::Excel will not be to handle the complex queries. Also, I cannot use any other thing as I have a huge program which will require more time to rewrite if I use different module.
Also, I didn't get much time to read on interpolate variables as suggested, but still the point is the query works fine if it is exists clause and it doesn't if it is not exists clause. Probably I will read first and then will comment.
Thanks all for your help
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||