SQL Variable with Parameter values not resolved