srivasva has asked for the wisdom of the Perl Monks concerning the following question:
use Win32::ODBC; use Win32::OLE; $DSN = "dsn=CRRLIVE;uid=$UserID;pwd=$Password"; if (!($db = new Win32::ODBC($DSN))){ print "Error connecting to $DSN\n"; print "Error: " . Win32::ODBC::Error() . "\n"; exit; } $SqlStatement = <<ENDSQL; declare @RepDate datetime select @RepDate = max(Date) from CRRWarehouse..AERReportDate where Dat +e >= '1 jan 2008' and [User] like '%SYS%' declare @CntCurrentDealSize int, @CntCurrentStatic int, @CntCurrentTrade int, @CntErrorTrade int, @CntFirstLegalEntity int, @CntGroupReport int, @CntImportBedrockData int, --- More code ENDSQL
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Win32::ODBC getting syntax error while executing sql
by Bloodnok (Vicar) on Nov 26, 2008 at 12:26 UTC | |
|
Re: Win32::ODBC getting syntax error while executing sql
by jonadab (Parson) on Nov 26, 2008 at 12:18 UTC |