Solved

Oracle NVL function

Posted on 2001-07-10
4
1,311 Views
Last Modified: 2012-05-04
I have an oracle database that I am retrieving data with Access.  One of the columns I am retrieving can be null.  I need to interogate the column for certain values.  However, I need to convert the nulls to some value so they are included in the comparision.

In SQL, this is what I want to do:

select PROD_ID from table1 where nvl(PROD_ID,'00') not in ('08','09')

How can I do this in Access?
0
Comment
Question by:gwj
4 Comments
 
LVL 11

Expert Comment

by:Otana
ID: 6270473
I'm not sure, but you might want to try isnull(Field,Value)
0
 
LVL 54

Accepted Solution

by:
nico5038 earned 100 total points
ID: 6270486
I guess NZ(PROD_ID,'00') is the function you're looking for.

Nic;o)
0
 
LVL 3

Expert Comment

by:Koka
ID: 6271488
Well, from Access point of view Nico is right and as the question was about NVL equivalent in Access he does deserve all those points :) , but I doubt it's was a good question - I think you are not handling Oracle backend in a proper way. Your query will retrieve all records from Oracle and will filter them locally - you loose all that client-server benefits. Better keep your NVL syntax and use pass-through query, then all the filtering job will be done by Oracle.

Good luck
0
 

Expert Comment

by:oscb7013
ID: 6272760
select PROD_ID from table1
where PROD_ID is not null
and PROD_ID not in ('08','09')
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

746 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

10 Experts available now in Live!

Get 1:1 Help Now