clydejones
Programmer
Hello,
I am writing a stored procedure where I passing a date value to it. This stored procedure MUST find date and time values. There is no problem with the SQL statement finding records with the correct date values. However, when I make a variable for a time value and add it to the SQL statement it has no effect on filtering the query. If I only use the time variable, I don't get any records returned. The field I am querying is of a DATETIME data type. How do I combine the date and time values to get the records that I want? Any help or suggestions will be appreciated.
PS: I have also tried making the time value a TIMESTAMP data type, but was getting error messages about using the convert function.
Thanks,
Clyde
I am writing a stored procedure where I passing a date value to it. This stored procedure MUST find date and time values. There is no problem with the SQL statement finding records with the correct date values. However, when I make a variable for a time value and add it to the SQL statement it has no effect on filtering the query. If I only use the time variable, I don't get any records returned. The field I am querying is of a DATETIME data type. How do I combine the date and time values to get the records that I want? Any help or suggestions will be appreciated.
PS: I have also tried making the time value a TIMESTAMP data type, but was getting error messages about using the convert function.
Thanks,
Clyde