Hello! I create a procedure

CREATE PROCEDURE aaa @god as date AS SELECT --- FROM --- WHERE DataPerevoda=YEAR ( @god ) 

The following error occurs:

Operand type clash: date is incompatible with int

I need to pull out only the code from the transfer date, YEAR ( @god ) does not work ...

    1 answer 1

    WHERE YEAR (DataPerevoda) = YEAR ( @god )

    • exactly thank you - wicS