there no triggers on table, though tsql script returns 1 row, sporadically... there index on labnumber.
select * dbo.minidataentry labnumber in ( select labnumber dbo.minidataentry entereddate > '7/10/2015' group labnumber having count(*) > 1 ) i attempting determine if there duplicate lab numbers today, there should not be.
one mistake in query incorrect date formatting -
7/10/2015 is interpreted string -> not able compare string other dates properly.
you should format string
2015-07-10
and should interpreted correctly.
the correct date format in sql
'yyyy-mm-dd hh:mi:ss'
at moment. (look here more information)
Comments
Post a Comment