Solved

Subtracting null from a number

Posted on 2006-11-07
3
1,022 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
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…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

623 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