I want to replace null with something else for a column in a SELECT column, but cannot get the function name. Please help.
Thanks.
Thanks.
column, but cannot get the function name. Please help.Quote:> I want to replace null with something else for a column in a SELECT
Quote:> Thanks.
Syntax
ISNULL(check_expression, replacement_value)
Arguments
check_expression
Is the expression to be checked for NULL. check_expression can be of any
type.
replacement_value
Is the expression to be returned if check_expression is NULL.
replacement_value must have the same type as check_expresssion.
Return Types
Returns the same type as check_expression.
Remarks
The value of check_expression is returned if it is not NULL; otherwise,
replacement_value is returned.
Examples
A. Use ISNULL with AVG
This example finds the average of the prices of all titles, substituting the
value $10.00 for all NULL entries in the price column of the titles table.
USE pubs
GO
SELECT AVG(ISNULL(price, $10.00))
FROM titles
hth
bob mcclellan
column, but cannot get the function name. Please help.Quote:> I want to replace null with something else for a column in a SELECT
Quote:> Thanks.
1. Need something to replace PictAlignment Property.
It ticks me off that Fox Team removed this rather than fix it. For
years other languages have had this ability, why not VFP.
Any suggestions for a good alternative?
Thanks!
DoodleBugger
3. How to replace NULL with 0 ?
4. SQL Logins with CreateDB rights cannot add themselves to roles
5. Replace NULL in select query
9. Replacing empty fields with NULL after a BULK INSERT
10. HELP: Need to Replace Nulls ----nvl()???
11. using bcp to replace null with a default
12. replace NULL values with other values