Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: SQL query using elements from array

by toolic (Bishop)
on Oct 03, 2014 at 17:35 UTC ( [id://1102762]=note: print w/replies, xml ) Need Help??


in reply to SQL query using elements from array

Single quotes (q) prevent variable interpolation. $sql2 contains the literal string $date1[$i], not its value ('2013-08-01 00:00:00.000'). Tip #2 from the Basic debugging checklist (print). Try qq
my $sql2 = qq/SELECT Login_ID, AuditChrt_TimeStamp, Patient_ID FROM TopsData.dbo.AUDT_AuditChrt WHERE master.dbo.fn_sqlvarbasetostr(AuditChrt_TimeStamp) >= $d +ate1[$i] AND master.dbo.fn_sqlvarbasetostr(AuditChrt_TimeStamp) <= +$date2[$i]/;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-20 12:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found