As I said, change declare @vTable into create table #vTable. It's possible your database is in compatibility mode 2000.
Premature optimization is the root of all evil in programming. (c) by Donald Knuth