Solved

Subtracting null from a number

Posted on 2006-11-07
3
975 Views
Last Modified: 2008-02-26
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
Comment
Question by:zafridi
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Aneesh Retnakaran earned 250 total points
ID: 17889912
SELECT Col1 - ISNULL(urNullColumn, 0)
from urTable
0
 

Author Comment

by:zafridi
ID: 17889941
oh i got it. i just used isnull to make it 0.
0
 

Author Comment

by:zafridi
ID: 17889945
thanks for urhelp anyway..tat was quick
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how the fundamental information of how to create a table.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now