I have two dates in an SPROC that I am trying to compare..
What is the easiest way? This is what I have (PERTINENT PARTS OF SPROC) as I believe the issue is with how I am comparing them:
@target_date date = NULL
DECLARE @original_target_date date = NULL
-- return @original_target_date
SELECT @original_target_date = target_date FROM TxPlus WHERE txplus_id = @txplus_id
the target_date could be updated after this point via update statement.
IF @target_date <> @original_target_date