to set zero for null value in select statement

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
 
W

Wayne-I-M

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));
 
J

Jeff Boyce

Check Access HELP for the exact syntax.

I suspect you could use something like:

Nz([YourField],0)

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
C

Clif McIrvin

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;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top