What I think I saw - So there I was happily loading a DECLAREd variable with a SELECT statement in a SQL Server SProc. The variable was declared like this:
DECLARE @myVar decimal
The value I was retrieving was decimal - precision 19.2 - but what I got in my decimal variable was integer. So I changed to a more specific definition like:
DECLARE @myVar decimal(19,2)
And then got what I expected, a decimal value. So I’m guessing the “decimal” declaration must default to something like “decimal(19,0)”.
Who knew?
Bill J
Charlotte NC