Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report variable returning the value for null instead of 0

Status
Not open for further replies.

dodge20

MIS
Jan 15, 2003
1,048
US
I have a smallint variable that is returning a value of -32768 (which I assume is the value) when it should return 0 or null. Is there anyway around this? Can you define a variable so that it returns 0 if it is null, (maybe add 32768 if is null)????

Thanks for your help.

Dodge20
 
For future reference if anyone comes across this problem. I was unable to pass indicator variables to set the value to 0 if the variable is null, for reasons having to do with my code. I was able to get around this by changing the data type to decimal with no decimal places

variable mcount decimal(6,0)

decimal sets a null value to 0.

Dodge20
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top