RE: Connecting MS SQL from linux

2008-11-09 Thread Ow Mun Heng
-Original Message- From: Jeff Pang [mailto:[EMAIL PROTECTED] >> De : "[EMAIL PROTECTED]" >> I'm using perl to connect to mysql, but now i need it to connect to MS >> SQL server and after google search i still don't understand the best >> way to do it. >> >Try Class::DBI::MSSQL or UnixOD

RE: Count of number of rows returned in delete / update sql in Perl DBI ?

2008-07-10 Thread Ow Mun Heng
This is what I use eval { print "Executing DELETE\n" if ($verbose); my $del_rows = $dbh_pg->do($pg_query1) or die "prepare failed DBI::errstr"; if ($del_rows != 0) { print "Number of rows deleted: " . $del_rows . "\n"; } else { $del_rows = 0; } -Original M

Extract string of form YYYYMMWW fro timestamp

2008-01-23 Thread Ow Mun Heng
I'm wondering there's a simpler was to achieve this w/o need to jump through a couple of hoops. (meaning, concatenate the fields together from extract or some other method) Timestamp : '2008-01-17 10:24:00' Output needed : 20080103 or even 200801w3 In postgresql, this is done via select to_char

Re: [OT] Warnings from code when using perl-dbi

2007-08-16 Thread Ow Mun Heng
On Thu, 2007-08-16 at 10:38 +0100, Gary Stainburn wrote: > Hi > > Firstly, for an excelent general perl list, try [EMAIL PROTECTED] It's not > just for beginners. Ah.. Cool.. I'll subscribe there. > > Secondly, it looks like you're trying to access a field that isn't defined, > possibly by r