SQL function ?

danial

Board Regular
Joined
Apr 29, 2006
Messages
107
Help me please
How can I create Query Pass Through(SQL Server Transact-SQL)
with formula value1 + value2
when some record of value2 is null value
I'm try to use (Value1 + Value2) as TotalInc
example : Value1 = 500, Value2 = ""
return value in TotalInc = ""

I need it show 500

Tnk inadvance

(in a normal access use function nz() )
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

CT Witter

MrExcel MVP
Joined
Jul 7, 2002
Messages
1,212
Try the following

ISNULL ( a1, a2 )
where a1 is the expression to be checked for NULL and a2 is the expression to be returned if a1 is NULL. If a1 is not null then a1 is returned.

HTH,
CT
 
Upvote 0

Forum statistics

Threads
1,191,690
Messages
5,988,061
Members
440,125
Latest member
vincentchu2369

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top