It should be:
WHERE
gsk.c_c2code = '00S204'
AND gsk_stk.lcc2code = '003004'
AND invrcvd.d_ldate >= @fromdate
AND invrcvd.d_ldate <= @todate
As you can see, i removed unnecessary signs:
'+ +'
around the variables.
For further details, please see:
MySQL Variables[
^]
[EDIT]
Quote:
first i tried without + sign still it did not come
So, try to set value to the variable different way:
SET @fromdate:='2019-08-30 00:00:00'
SELECT @fromdate:=MAX(dateTimeField)
FROM yourtable;