Hi Monks,

I am using perl DBI module for my mysql queries one of my query fails to execute and generates an error message:

DBD::mysql::st execute failed: Can't find file: '.\prod\p.frm' (errno: 13)

the query is presented below:

select left(B.B_num,3) as JD, sum(B.B_COUNT) as Doc_Cnt, P.PROJECTED_VOL as Proj_Vol, P.DD_RECD as DD_Recd, P.JD_CURRENT as JD_Current, P.JD_FUTURE as JD_Future from batches B left join projectedvolume P on P.REPORT_IMPORT_DT = B.REPORT_IMPORT_DT where B.REPORT_IMPORT_DT = '2005-10-12' group by left(b_num,3)

When I copied this query to mysql prompt for query, only half of this got pasted and i was not able to key more (is there any maximum query length?).

The query that worked is:

select left(B_num,3) as JD, count(B_Num) as BatchCount, sum(B_count) as DocCount from Batches where report_import_dt = '2005-11-10' and b_status in ('RD', 'RO') group by left(b_num,3)

Pls. help me to overcome this issue

Thanks

PDL_Babu

Edit: Tidied SQL (davorg)


In reply to Perl DBI Error by pdl_babu

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • 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:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, 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, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.