Solved

Subtracting null from a number

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MS SQL export CSV & schedule It 9 44
Query Missing Money orders... 6 72
Save sql query result in sql server 15 25
separate column 24 20
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…
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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.
Via a live example, show how to shrink a transaction log file down to a reasonable size.

760 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

21 Experts available now in Live!

Get 1:1 Help Now