• Hi Stewart,

    when I shuffled @vperc int, to up 3 locations it is still giving error at line 30 for another variable and the error code I get is as follows:-

    Msg 156, Level 15, State 1, Procedure canteeninvoicedetlins, Line 30

    Incorrect syntax near the keyword 'DECLARE'.

    Hope this helps.

    I was very good at sql but variety spoiled me ! :w00t: