I have a query which does not works:-
ALTER PROCEDURE [dbo].[stp_validate_DT_Requested]
-- Add the parameters for the stored procedure here
@DT_Requested as Date,
@Firsttime as Time,
@Lasttime as Time
SET Dateformat YMD
if @DT_Requested >= GETdate() and @Firsttime <= @Lasttime
SELECT '1' AS IsValid
SELECT '0' AS IsValid
What i expect that it will do is to check if a requested date is bigger or the same as the current date and that the requested endtime is later then the start time. An agenda check.
What is wrong?
thanks for your help!