• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1092
  • Last Modified:

Subtracting null from a number

how can i subtract a null from a number..is it possible in sql. i have a number in one column and nulls in another column.
my query should give me all the numbers but i have to do subtraction because in the second column there are som numbers. thanks for ur help.
0
zafridi
Asked:
zafridi
  • 2
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
SELECT Col1 - ISNULL(urNullColumn, 0)
from urTable
0
 
zafridiAuthor Commented:
oh i got it. i just used isnull to make it 0.
0
 
zafridiAuthor Commented:
thanks for urhelp anyway..tat was quick
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now