Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Query Does not work in Spreadsheet::WriteExcel

by dirtdog (Monk)
on Jul 21, 2020 at 15:06 UTC ( [id://11119602]=note: print w/replies, xml ) Need Help??


in reply to Re: Query Does not work in Spreadsheet::WriteExcel
in thread Query Does not work in Spreadsheet::WriteExcel

Hi, because i proved that the perl code works by substituting the complex query with a simple one. The question is does Spreadsheet::WriteExcel have any limitations on how complex a query can be. I know there is no issue with the perl code within the script

  • Comment on Re^2: Query Does not work in Spreadsheet::WriteExcel

Replies are listed 'Best First'.
Re^3: Query Does not work in Spreadsheet::WriteExcel
by Corion (Patriarch) on Jul 21, 2020 at 15:11 UTC

    Spreadsheet::WriteExcel does not know anything about (SQL) queries. There is something else that runs the SQL query on your server and then hands over the query results to Spreadsheet::WriteExcel. Whatever that part does, you have not shown us its code, and maybe there is where (part of) the problem is.

      Thanks Corion. That is good to know. I'll zero in on the perl code then.

        Hi Monks, just wanted to follow up with what i did to get this to finally work. I don't really understand why i had to do it, but maybe one of the Monks will.

        The issue is that in an Oracle client (TOAD for example) the following col of a select statement worked, but within perl using DBI it did not. Ultimately, i had to escape the backslash character....so \W+...became....\\W+

        From:

        regexp_substr(SDSM2.MSG_BODY,'(:16R:ACCTINFO)\W+(:95[[:alnum:]]*)*\W+: +97A::SAFE//'||SDSM1.ACT_N||'(.+?):16S:ACCTINFO',1,1,'n') as accnt_inf +o,

        To:

        regexp_substr(SDSM2.MSG_BODY,'(:16R:ACCTINFO)\\W+(:95[[:alnum:]]*)*\\W ++:97A::SAFE//'||SDSM1.ACT_N||'(.+?):16S:ACCTINFO',1,1,'n') as accnt_i +nfo,

        After making that change it worked inside perl.

        thanks for the help!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11119602]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-19 13:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found