in reply to Managing Dynamic SQL

You could also set a flag Default them to 0 first of course.
my $Have_Date=0; my $Have_Time=0;
Then set $Have_Date=1; or $Have_Time=1; when the user enters the info. Then when its time to do the query:
if ($Have_Date) { # # Bind Date Param Stuff # } if ($Have_Time) { # # Bind Time Param Stuff # }
You get the idea...