How to handle Null value in Database Adapter

I configured the DA Adapter, with operation type as "Perform an Operation on a Table - Select" and added few where clause parameters (StreetNo, StreetName city, country, state, zipcode)too.
If we won't enter any value for any of the column in the table (S_ADDR_PER) is taking as NULL, so what happening is, if i give "%" or if i leave as "blank" to those columns(input for where clause parameter). The DB adapter not fetching any records. Any help to handle this situation.
I need query like this...
select * from S_ADDR_PER where city like '%' AND state is NULL AND addr_line_2 like '%';
seems.... I can't use the pure SQL option since i don't know which column will be null. Some case the addr_line_2 column will be NULL in table, in some other case the state or city column will be null.

Hi,
you can handle null with date like this , If it doesn't wortk for you then please explain your problem.
select NVL(to_char(sysdate,'DD-MON-YY'),'Not Recorded')
from dual
NVL(TO_CHAR(
08-NOV-05
select NVL(to_char(NULL,'DD-MON-YY'),'Not Recorded')
from dual
SQL> /
NVL(TO_CHAR(
Not Recorded
Regards

Similar Messages

  • How HANA handle NULL values

    Hi frzz,
    Can any one explain me how exactly HANA handles NULL values??
    Best Regards,
    Krishna.

    Hi Krishna,
    You can use IFNULL for the SQL queries/script instead of ISNULL . Since ISNULL is binary function and will be mostly used for the CE Functions based Calc views.
    Try using the same queries with IFNULL instead of ISNULL, it should work
    Best Regards
    Rahul Jha

  • Oracle Discoverer: How to handle null value

    In Oracle Discoverer, I pull data from a folder. When I hit Null value for a column, I want to replace it with data from another folders column. Something like the functionality of "nvl" of a SQL statement. How can I do the following query in Discoveror :
    example: select nvl(table1.column1,table2.column2) from table1, table2
    where table1.column7 = table2.column7.

    Hi,
    You first need to include any column from folder table2 into your report so that Discoverer will do the join. (This assumes the join between table1 and table2 is set up in your EUL). Then you can create a calculation containing nvl(table1.column1,table2.column2) . You can then remove the column from folder table2 and the join will stay in your workbook.
    Hope that helps,
    Rod West

  • Oracle Discoveror: How to handle null value

    In Oracle Discoveror, I pull data from a folder. When I hit Null value for a column, I want to replace it with data from another folders column. Something like the functionality of "nvl" of a SQL statement. How can I do the following query in Discoveror :
    example: select nvl(table1.column1,table2.column2) from table1, table2
    where table1.column7 = table2.column7.

    Hi,
    You first need to include any column from folder table2 into your report so that Discoverer will do the join. (This assumes the join between table1 and table2 is set up in your EUL). Then you can create a calculation containing nvl(table1.column1,table2.column2) . You can then remove the column from folder table2 and the join will stay in your workbook.
    Hope that helps,
    Rod West

  • How to handle null values in RTF templates

    Hi - I have two groups in a report for different SQL and two formulas for each group, CF_ELE_CNT and CF_ELE_CNT1. In the template I use the below code to print or not print a section.
    <?if:number(CF_ELE_CNT +CF_ELE_CNT1) >0?>    
    The problem is when there is no data in the second group its not creating the XML tag for CF_ELE_CNT1, though CF_ELE_CNT has 13, it still does not print that partucular section. If I remove CF_ELE_CNT1 from the condition it works fine. I was wondering how to handle this.
    Any help would be appreciated!!
    Thanks,
    Rav

    Hey Rav,
    You can add a check to identify it the element/tag is present or not
    <?if:(CF_ELE_CNT1)?> will give true, if the element is present otherwise falsesince you are adding the two elements, you have to add a or condition.
    <?if:(CF_ELE_CNT and number(CF_ELE_CNT) >0 ) or ( CF_ELE_CNT1 and CF_ELE_CNT1 >0)?>

  • How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working 10g

    Hi,
    How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
    We have tried below methods
    1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    2) in that formula columns we have put it below case condition also ,
    Measure Column: Nom_amt --> edit formulas
    CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
    3) we have uncheked IS NULL check box in the admin tool also
    I tried above formats still it's not working for me..kindly help me on this..
    thanks to do the needfull
    Best Regards,
    R.Devarasu

    Hi,
    Null value in database displaying as 0 in report, I need to keep value as in database, and I have one calculated row which is based on null values should also null in report.
    but it showing 0 for null values also so, my calculated row showing wrong result.
    my report is like
    col1 col2
    ABC 0
    BCD 12
    DEF -12 --this is calculated row.
    I require result like:
    col1 col2
    ABC null
    BCD 12
    DEF null --this is calculated row.
    Please let me know how I can achieve this.
    Thanks,
    Rahul

  • List of values from Database Adapter - BPM Forms

    Hi all,
    Can anyone tell me how to get list of values from Database adapter and a ServiceTask.
    As example lets say a table has Employee and Department columns.
    I want to list down all the Employees in BPM form (Select One List Box) once i provide the department to the Database Adapter.
    Is it possible from the DB Adapter?? What will be the variable type?
    Thanks,
    Nir

    Hi DanielAtwood,
    Thanks for your reply...
    Actually when i send the variable in 'WHERE Clause' in Db Adapter query it will retrieve more than one record as the output.
    I want to put that values to a 'SelectOneChoice' component and list down all the values..
    First I tried with data control. But i couldn't find the way to pass the value to the variable(in WHERE clause) to the query in data control view.
    Thanks,
    Nir

  • Model of how APEX handles data (values)?

    Reference {thread:id=2486655}
    I'm trying to get a model of how APEX handles data (values). There are several places(?) that data (values) can exist. Or so it seems. I'm trying to understand how these work -- to put all the pieces together.
    Question:
    A) Where data can be?
    1) In the database
    2) In the session
    3) Rendered -- and hence displayed on the screen, if a displayed value -- but not in the session
    4) In perhaps(?) some working memory pool(?) but different from the page rendered values I see on the screen?
    5) Other?
    Why do I think this is relevant?
    Question:
    B) If there are rendered values and session values different from the rendered values, then when code executes, which of these values (rendered or session) is it executing against?
    And maybe the answer is, "You don't understand what's going on." Yes, "Exactly!" Hence the question.
    Best wishes,
    Howard

    Howard (DBA in Training) wrote:
    I'm putting this together now. For example:
    I set the value of a Page Item (say, :P2_DATA) to "BEFORE" in a Before Region process and change it to "AFTER" in an After Region Process. 'BEFORE' was displayed on the screen but 'AFTER' was in the session state. So I see that PL/SQL changes these values in the session state. But it doesn't "go back" to change the HTML after the region has been rendered -- hence we see BEFORE shown on the screen. (I'll have to think about what a Dynamic Action does.)
    Also, if a page item has a default value, say 'DEFAULT' then that value doesn't get into the session state. At least, not with my current settings. Oh, that explains a lot of confusion!! I suppose there's a logical reason for this but who would expect default values to be differently from other PL/SQL operations on the item?
    Questions:
    1) So why does a default value not get put into the session state?Several reasons, among them:
    *1. When/why is the value required?* Region items (and thus their source and default values) are rendered in region/item sequence order. The item's source/default value would therefore not be available in session state until it's rendering point. This is frequently later in page show processing than the value is actually required, such as the common use case of including a data value in the page or region title. Setting the value in a Before Header/Regions computation or process makes it available as required before the item is actually rendered.
    *2. The rendered page might not be submitted.* Default values are typically set when a page will create a new row. Consider the situation where the user clicks a "Create" button and is presented with an order entry form containing several default values. They then decide they don't want to create a new order after all, and navigate away from the form page via some mechanism that uses a redirect rather than a submit (such as a default "Cancel" button). This means that no page submit processing is performed, and generally that no session state management is performed. If the default values were set in session state, the order entry page would contain the default values for the non-existent order despite the user never submitting it. This may have unwanted side-effects if these values are referenced elsewhere in the application, and therefore would require extra session state management to be built into the application.
    *3. A rendered item might not be submitted with the page.* Per the HTML specification, the values of disabled controls unchecked checkboxes are not POSTed on page submit. Consider a situation where a checkbox item is set with several default values, but the application requires that the checkboxes be cleared and disabled by a dynamic action if the user chooses certain options from a select list. In this case, on page submission no values are submitted into session state for the checkbox item. If the defaults had been set in session state, then the application would be in an inconsistent state, with the user-selected option indicating that none of the checkboxes were checked, but with session state holding values showing that they were. This would require additional processing to ensure that the application's state was consistent before saving it to the database.<sup>1</sup>
    2 & 3 are particularly significant in basic wizard-generated applications. Doing things in this way, the wizard-generated DML and navigation "just works", without the need for additional session state management.
    2) Is there a Page Item setting that causes the default value to be saved to the session state?No. Hopefully the explanations above provide sufficient reason to show why this is genearlly not desirable. On the rare occasions when it is required, set the session state value using a computation or process.
    <sup>1</sup> There are other reasons&mdash;mainly security related&mdash;that make it good practice to perform such checks in more complex and internet-facing applications anyway.

  • How to delete null values in a table

    hi all,
    tell me please any one how to delete null values in a table
    example:
    in emp table is there
    empno ename job mgr sal deptno
    7900 scott 7902 2000 10
    7499 clerk 7900 20
    7834 james manager 3000 30
    like this in the above emp table there are some null values are there
    so how to delete the null values in emp table
    thanks,
    regards.
    Edited by: user9195968 on Feb 25, 2010 6:30 AM

    not too sure what you mean, perhaps you could supply a table description and some sample data
    but, consider
    delete from table_1 where column_1 is null
    commit
    /

  • How to Replace Null Value as 0 in an OBIEE11g Pivot Table?

    Hi,
    How to Replace Null Value as 0 in an OBIEE11g Pivot Table? it's working in obiee10g version.
    We have tried below methods
    1) criteria tab and edit the ‘column properties’ associated with your fact measure. Choose the ‘Data Format’ tab, tick to override the default format and choose ‘Custom’.
    It seems that the syntax for this custom format is positive-value-mask (semi colon) negative-value-mask (semi colon) null-mask. So this means we have a few options.
    E.g. if you want zeros (0) instead of null then enter:
    #,##0;-#,##0;0
    2) in that formula columns we have put it below case condition also ,
    Measure Column: Nom_amt --> edit formulas
    CASE WHEN Nom_amt IS NULL THEN 0 ELSE Nom_amt END
    3) we have uncheked IS NULL check box in the admin tool also
    I tried above formats still it's not working for me..kindly help me on this..
    thanks in advance...
    Best Regards,
    R.Devarasu

    Hi Amith,
    I have update your suggested one,but it's working few of the rows only..remainings rows some of cells still NULL only
    Measure colmns is : Nom_SGD
    IFNULL(Nom_SGD,0.00)
    Movment : dynamic date calc by using $2-$1 oracle formula's
    Actually i am doing below things only,
    31/12/2011 31/03/2011 Movment
    Country
    India 100 -50 -150
    Singapore 200 200
    UK 1200 -1200
    USA 0.00 0.00 0.00 (here changed null as 0)
    Helpmeon this...

  • HELP NEEDED !! Null values in Database

    Hi there !!
    I need help with EJB 3.0 passing null values to database. The situation looks like that :
    I have created EJB entity class called "Osoba.java", it is in relation
    with "Rola.java" (one to many). Each Object of class Osoba can have
    many Roles. Then I created "OsobaServiceBean.java " I included it with
    metod "CreateUnregisteredOsoba(Osoba , Boolean)". From "flex" level I
    call this bean - call is accepted, and as a result new object of class Osoba is added to database. Problem is that only one column is filled in table,
    dispite that in service bean I enforce it to fill all columns (see
    source code - file OsobaServiceBean.java , method
    createUnregisteredOsoba() )
    I provided source code here :
    FILE Rola.java
    package test.granite.ejb3.entity ;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.ManyToOne;
    @Entity
    public class Rola extends AbstractEntity {
    private static final long serialVersionUID = 1L;
    @Basic
    private String login = new String("");
    @Basic
    private String rola = new String("");
    @Basic
    private String roleGroup = new String("");
    @Basic
    private Boolean zatwierdzony = new Boolean(false);
    @ManyToOne(optional=false)
    private Osoba osoba;
    public Boolean getZatwierdzony() {
    return zatwierdzony;
    public void setZatwierdzony(Boolean zatwierdzony) {
    this.zatwierdzony = zatwierdzony;
    public String getLogin() {
    return login;
    public void setLogin(String login) {
    this.login = login;
    public String getRola() {
    return rola;
    public void setRola(String rola) {
    this.rola = rola;
    public Osoba getOsoba() {
    return osoba;
    public void setOsoba(Osoba osoba) {
    this.osoba = osoba;
    public String getRoleGroup() {
    return roleGroup;
    public void setRoleGroup(String roleGroup) {
    this.roleGroup = roleGroup;
    FILE Osoba.java
    package test.granite.ejb3.entity ;
    import java.util.HashSet;
    import java.util.Set;
    import javax.persistence.Basic;
    import javax.persistence.CascadeType;
    import javax.persistence.Entity;
    import javax.persistence.FetchType;
    import javax.persistence.OneToMany;
    @Entity
    public class Osoba extends AbstractEntity {
    private static final long serialVersionUID = 1L;
    @Basic
    private String imie;
    @Basic
    private String nazwisko;
    @Basic
    private String login;
    @Basic
    private String haslo;
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.EAGER,
    mappedBy="osoba")
    private Set<Rola> role = new HashSet<Rola>();
    @Basic
    private String email;
    @Basic
    private String nrTelefonu;
    @Basic
    private int rokStudiow;
    public String getPelneImie() {
    StringBuilder sb = new StringBuilder();
    if (imie != null && imie.length() > 0)
    sb.append(imie);
    if (nazwisko != null && nazwisko.length() > 0) {
    if (sb.length() > 0)
    sb.append(' ');
    sb.append(nazwisko);
    return sb.toString();
    public String getImie() {
    return imie;
    public void setImie(String imie) {
    this.imie = imie;
    public String getNazwisko() {
    return nazwisko;
    public void setNazwisko(String nazwisko) {
    this.nazwisko = nazwisko;
    public String getLogin() {
    return login;
    public void setLogin(String login) {
    this.login = login;
    public String getHaslo() {
    return haslo;
    public void setHaslo(String haslo) {
    this.haslo = haslo;
    public Set<Rola> getRole() {
    return role;
    public void setRole(Set<Rola> role) {
    this.role = role;
    public String getEmail() {
    return email;
    public void setEmail(String email) {
    this.email = email;
    public String getNrTelefonu() {
    return nrTelefonu;
    public void setNrTelefonu(String nrTelefonu) {
    this.nrTelefonu = nrTelefonu;
    public int getRokStudiow() {
    return rokStudiow;
    public void setRokStudiow(int rokStudiow) {
    this.rokStudiow = rokStudiow;
    FILE OsobaServiceBean.java
    package test.granite.ejb3.service;
    import java.util.HashSet;
    import java.util.List;
    import java.util.Set;
    import javax.annotation.security.RolesAllowed;
    import javax.ejb.Local;
    import javax.ejb.Stateless;
    import javax.persistence.Query;
    import org.jboss.annotation.security.SecurityDomain ;
    import test.granite.ejb3.entity.Osoba;
    import test.granite.ejb3.entity.Rola;
    @Stateless
    @Local(OsobaService.class)
    @SecurityDomain("other")
    public class OsobaServiceBean extends AbstractEntityService implements
    OsobaService{
    private static final long serialVersionUID = 1L;
    public OsobaServiceBean() {
    super();
    public List<Osoba> findAllOsoba() {
    return findAll(Osoba.class);
    @SuppressWarnings("unchecked")
    public List<Osoba> findAllOsoba(String name) {
    Query query = manager.createQuery (
    "select distinct p from Osoba p " +
    "where upper(p.imie) like upper('%" + name + "%')
    or upper(p.nazwisko) like upper('%" + name + "%')"
    return query.getResultList();
    public Osoba createOsoba(Osoba person) { // pozwalamy
    tworzyc zeby niezalogowany
    return manager.merge (person); //
    uzytkownik utworzyl osobe
    } // ale
    osoba ta i tak nie bedzie jeszcze
    // zatwierdzona
    @RolesAllowed({"unregistered"})
    public Osoba createUnregisteredOsoba(Osoba person, boolean
    zatwierdzony) {
    Rola niezarejestrowany = new Rola();
    niezarejestrowany.setRola("user");
    niezarejestrowany.setOsoba(person);
    niezarejestrowany.setRoleGroup("Roles");
    niezarejestrowany.setLogin(person.getLogin());
    niezarejestrowany.setZatwierdzony(zatwierdzony);
    Set<Rola> role = new HashSet<Rola>();
    role.add(niezarejestrowany);
    // Arrays;
    Object a[] = role.toArray();
    Rola temp;
    temp = (Rola)a[0];
    System.out.println("Login = " + temp.getLogin() + //
    added only for check !!
    "Rola = " + temp.getLogin() +
    "Zatwierdzony = " +
    temp.getZatwierdzony() +
    "Rolegroup = " + temp.getRoleGroup());
    person.setRole (role);
    return manager.merge(person); //
    uzytkownik utworzyl osobe
    } // ale
    osoba ta i tak nie bedzie jeszcze
    public Osoba modifyOsoba(Osoba person) {
    return manager.merge(person);
    @RolesAllowed({"admin"})
    public void deleteOsoba(Osoba person) {
    person = manager.find(Osoba.class, person.getId());
    manager.remove(person);
    public void deleteRola(Rola rola) {
    rola = manager.find(Rola.class, rola.getId());
    rola.getOsoba().getRole().remove(rola);
    manager.remove(rola);
    DATABASE LISTING :
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    | id | ENTITY_UID | version | rola |
    zatwierdzony | osoba_id | login | RoleGroup |
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    | 1 | | NULL | unregistered |
    | 0 | unregistered | Roles | NULL |
    | 33 | eee91bd9-8c5f-4154-8260-3cac9a18eb97 | 0 | user |
    | 34 | NULL | NULL |
    | 32 | a7ed4e8d-a1ba-473a-921c-73c8f8f89efb | 0 | user |
    | 33 | NULL | NULL |
    -----------------------------------------------------------------+----------\
    --------------------------------------------------------+
    The row numer 1 is added by hand and it works. row number 33 and 32
    are added to database by method CreateUnregisteredOsoba. As you can
    see fields login as well as Roles and RoleGroup are empty (NULL). What
    Im doing wrong ?
    Thanks for your help -
    Roman Kli&#347;
    PS. Table Osoba works fine - everything is added as I want.

    I solved problem.
    The reason why EJB had not added anything to database NULL was becouse wrong names of class. Ive refactored whole class Rola.java to RolaClass.java and suddenly it worked.
    True reason is still unknown but most importent is that it works.
    Thanx for reading topic - hope next time someone will answer my questions.
    By !!

  • How to handle empty file using sftp adapter

    Hi,
    Please explain me how to handle empty files in sftp adapter.
    Thanks,
    Enivass

    Hi Enivaas,
                        I don't have the seeburger sftp adapter at hand at the moment, but asfar as I remember, this does not specifically have an empty-file handling option like the standard ftp adapter.
    So to stop emtyp files from being written, guess would need to handle this at the mapping level. For example, check for target creation criteria in the header node in mapping. If the creation criteria is not met, you can throw an error in mapping.
    You may also incorporate this condition in your Receiver determination. In this case, if the condition is not satisfied, no receiver is determined in PI.
    Regards

  • How to assign NULL value to an ITEM in Forms Personalization?

    Hi,
    how to assign NULL value to an ITEM in Forms Personalization?
    please suggest me.
    Thanks

    I don't know what your form personalization does and maybe I misunderstand you ...
    Try
    :item_name := null;

  • How to handle null pointer exception

    dEAR ALL
    how to handle null pointer exception
    public void xxperscompmatchcase(OAPageContext pageContext,
    OAWebBean webBean,String cid,String pid)
    xxcrmleadperslastnameVOImpl vo=getxxcrmleadperslastnameVO();
    xxcrmleadcompnameVOImpl vo1=getxxcrmleadcompnameVO();
    vo.setWhereClauseParams(null);
    vo1.setWhereClauseParams(null);
    vo.setWhereClauseParam(0,pid);
    vo1.setWhereClauseParam(0,cid);
    vo.executeQuery();
    vo1.executeQuery();
    String compname="";
    String plname="";
    if(vo1.first().getAttribute("CompName")!=null)
    compname=(String)vo1.first().getAttribute("CompName");
    else
    compname="";
    if((String)vo.first().getAttribute("PersLastname")!=null)
    plname=(String)(String)vo.first().getAttribute("PersLastname");
    else
    plname="";
    OAFormattedTextBean p =
    (OAFormattedTextBean)webBean.findChildRecursive("personmatchcase");
    OAFormattedTextBean b =
    (OAFormattedTextBean)webBean.findChildRecursive("matchcase");
    b.setValue(pageContext,
    "The Lead is matched to company " + compname.toUpperCase());
    p.setValue(pageContext,
    "The Lead is matched to person " + plname.toUpperCase());
    it is going to null pointer exception
    how to handle this exception

    Hi,
    try
    //Write your logic here, which can generate any exception
    catch(Exception e)
    //Write your exception specific code here
    Regards,
    Reetesh Sharma

  • Handle NULL Values from Teradata Database in OBIEE

    Hi All,
    I have records in a Teradata that are marked with 'A' for Available and sometimes blanks. Even though in OBIEE I have put a filter that says display all records with NULL values or 'A' I am only getting values with 'A'. How can I pick up the records with blanks in that field.

    Looks like the column value is not NULL. I would suggest to know the exact value of the column
    you may go for expression like length(col) where col!='A'
    or
    case when col is null then '1null'
    when col='' then '2'
    etc..
    once you know the value then replace with 'Unspecified' or any text.

Maybe you are looking for

  • Safari will not open despite restart and reinstallation of OS.

    When I open safari, I cant access any menus (I just see the color wheel when I hover over any menus).  On activity monitor, Safari uses increasingly larger amounts of memory.  I have to force quit to get out of the application.  Ive restarted numerou

  • "Define New" feature for the UDF

    I have created UDFs in Item master data. I want to load each of my UDFs with the data from a Database field from an UDT. For e.g, my UDF's name is U_Size. My UDT has the following structure: Code - Name -U_Size. I want to display the values of U_Size

  • Please i need help the forms are not running

    the forms are not running by internet exp and i am trying all of things , then i am working now with Firefox and the problem still running and the error is additional plugins are required to display all the media in this page what can i do to running

  • Why do I keep getting new pins sent to me?

    I downloaded the Messages app on my wife's phone and it keeps sending new pins and saying it failed the security. What do we need to do?

  • What r the services can be imported in visual composer

    Hi all, Can anyone tell me wht are the services can be imported in VC. And can i import XI interface as service into visual composer?? and also plz tell me how to import a service into visual composer and also how to integrate different systems to th