• I figured out what the problem was.

    I was declaring the variable having the datatype NVARCHAR, where they should be declared as VARCHAR 🙁

    Thanks