Top.Mail.Ru
? ?
jfroebe, posts by tag: sql - LiveJournal
Me :)
 
blue man

In How to read batches of SQL from a file in Perl, we learned how to read a SQL file and extract individual batches and created the Perl module dbS::Sybase::Parse::SQL_File. In How to colorize your code using Perl and Syntax::Highlight::Engine::Kate, we learned how to make HTML highlighted arbitrary code and created Perl module dbS::misc. Finally, in Sending email with attachments from Perl - the easy way, we learned how to send email with attachments and created Perl module dbS::EMail.

Now, we are going to tie them all together so we can send ourselves colorized SQL code and a screenshot of an application going screwy!

blue man
It is often so easy to just call isql from within your Perl script, but do you really want to depend on Sybase's / Microsoft's isql program for *YOUR* application? Just read the file in your Perl app yourself and avoid isql. Handle the errors in whatever way you want.

Read more...
blue man
The original developers of the stored procedure had some wonky ideas of optimization.  There were two queries within the stored procedure I had to rewrite.

I can't provide the actual code but it went something like this:
queriesCollapse )

Life is good :)
This page was loaded Feb 27th 2026, 2:57 pm GMT.
Image