to set zero for null value in select statement

  • Thread starter Thread starter pol
  • Start date Start date
P

pol

Please anybody can let me know to give the value as zero for null values

eg:

select nvl(salary,0) from salary;

regards

Polachan
 
Is Null Or 0
in the criteria row, use it like this

SELECT TableName.salary
FROM TableName
WHERE (((TableName.salary) Is Null Or (TableName.salary)=0));
 
Check Access HELP for the exact syntax.

I suspect you could use something like:

Nz([YourField],0)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
pol said:
Please anybody can let me know to give the value as zero for null
values

eg:

select nvl(salary,0) from salary;

regards

Polachan


select NZ(salary,0) from salary;
 
Back
Top