There’s a shortcut to this without having to specify SET all the time right?
So I thought you could combine declaration and assignment like this:
DECLARE @Field1 = 24.00,
@Field2 = 11.10,
@Field3 decimal = .50
am I doing this wrong or is it not possible and I must declare the variable and then use SET on every other line?
If you are using SQL Server 2008 this should work:
Looks like you just left out the type for the first two variables.