Solved

Subtracting null from a number

Posted on 2006-11-07
3
980 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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
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 to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

815 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

11 Experts available now in Live!

Get 1:1 Help Now