Solved

Oracle NVL function

Posted on 2001-07-10
4
1,339 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

808 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