This works:
SELECT *
FROM dbo.dhel_view_sample_test_results
WHERE (date_received >= '2006-04-13 00:00:00') AND (date_received < '2006-04-14 00:00:00') AND (lab_section = 'PS')
This Does not:
SELECT *
FROM dbo.dhel_view_sample_test_results
WHERE (date_received >= @date) AND (date_received < @date) AND (lab_section = 'PS')
@date = 04/14/2006
Why would this be? I need to fix it to accept the variable date. Using Sql Server.
TIA!
SELECT *
FROM dbo.dhel_view_sample_test_results
WHERE (date_received >= '2006-04-13 00:00:00') AND (date_received < '2006-04-14 00:00:00') AND (lab_section = 'PS')
This Does not:
SELECT *
FROM dbo.dhel_view_sample_test_results
WHERE (date_received >= @date) AND (date_received < @date) AND (lab_section = 'PS')
@date = 04/14/2006
Why would this be? I need to fix it to accept the variable date. Using Sql Server.
TIA!