Equivalent of 'null' for integers?

I was wondering if the integer data type has a value that is the equivalent to 'null'?

yeah don't use 0 0 is a number null is nothing.
The best thing to do if you don't want it to be a
a NPE (NullPointerException) would be to do what was
suggested but use a negitive number (providing your
numbers are supposed to be positive).No.
Don't avoid null just to avoid NPE if null best represents what you're trying to do. Use null, test your code thoroughly to make sure that null is handled properly when it occurs (and "handling it properly" may mean throwing NPE--exceptions aren't evil), and document what null means and how it's handled so that users of your class can use it properly.

Similar Messages

  • Equivalent of null for CLOB in a view

    Hi,
    I am trying to create a view using union. One table has a column of CLOB type. The other table doesn't have this column so I am trying to select null like
    select a_clob from a
    union
    select null from b
    Its giving me an error "ORA-01790 expression must have the same datatype as corresponding expression".
    Any help is greatly appreciated.
    Regards,
    Wasim.

    Try this:
    select a_clob from a
    union
    select empty_clob() from b;

  • NULL vs NOT NULL for end effectivity

    I am working on a data model that needs to keep track of the properties of a company asset as of certain dates. In short my table looks like this:
    (loc is a FK but for this example i made it more legible)
    create table assets
      asset_id     number,
      asset_no     number,
      loc          varchar2(20),
      eff_start_dt date,
      eff_end_dt   date 
    asset_id  asset_no  loc         eff_start_dt  eff_end_dt
    1         1         san diego   10-may-09     13-may-09
    2         1         los angeles 13-may-09     14-may-09
    3         1         sacromento  14-may-09     null
    4         2         san diego   10-may-09     19-may-09
    5         2         bakersfield 19-may-09     nullLong story short there was a debate on weather or not the "eff_end_dt" should be null for the current location or if it should be some predetermined date far off into the future like 01-JAN-99. Is one method truly better than the other or should we just pick one and write our queries accordingly.
    Cheers,
    Tyson Jouglet

    Not trying to be the devil's advocate, as I agree on using nulls to represent unknown values, still some authors like CJ Date and others say that using nulls should be avoided. Much of that is based on relational theory though, and in practical real life it becomes much harder to make your data model (and your application) null-proof. Better live with it in my opinion, since SQL and relational databases rely on it. One just has to know how to deal with null properly.
    http://www.dcs.warwick.ac.uk/~hugh/TTM/Missing-info-without-nulls.pdf
    http://www.snopes.com/autos/law/noplate.asp
    http://tkyte.blogspot.com/2009/10/back-from-oracle-openworld.html

  • Why "null" value is impossible in "switch(val) {case null: }"  for enums?

    I'm wondering why Java 5.0 does not allow null values
    as options in switch statement:
    If type E is "enum" then the following language construction is
    not allowed:
    E val;
    switch(val) {
       case A:
         break;
       case B:
           break;
       case null:   // this is not allowed
            break;
    }Can somebody explain me why Java does not support it? I beleave that
    some serious reasons were for that.
    As we know enum types can have "null" values and in case I use nulls
    for my enumerations the code with "switch" statement becomes quite urgly because it is necessary to handle 2 separate execution paths:
    null and not null.
    Thanks

    I really don�t know too much about 1.5, but I can tell you that for 1.4 the switch receives as a parameter an int or anything that can be casted automatically to an int. Therefore you can�t never use null cause int, char, short, byte can�t never take as a value null.

  • Using MISSING FIELD VALUES ARE NULL for external table

    I want to place a null for values missing in the sub_account field. Here is my external table:
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_log_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\log';
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_bad_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\bad';
    create table ext_INCOMING_ORDERS_table (
    Account varchar(5),
    Sub_Account varchar(1),
    Override_Code varchar(1),
    Nomenclature varchar(28),
    chg_nbr varchar(3),
    quantity integer,
    U_I varchar(5),
    zipcode varchar(5),
    type_reject varchar(2)
    organization external
    type oracle_loader
    default directory user_dir
    access parameters
    records delimited by newline
    missing field values are null
    badfile INCOMING_ORDERS_bad_dir:'INCOMING_ORDERS%a_%p.bad'
    logfile INCOMING_ORDERS_log_dir:'INCOMING_ORDERS%a_%p.log'
    fields
    Account(1:5) char(5),
    Sub_Account(7:7) char(1),
    Override_Code(10:10) char(1),
    Nomenclature(11:38) char(28),
    chg_nbr(40:42) char(3),
    quantity(44:48) integer external,
    U_I(50:54) char(5),
    zipcode(56:60) char(5),
    type_reject(61:62) char(2)
    location('PTCLICK.MANUAL.NOMEN.TXT','PTCLICK.ORDERS.TXT', 'EUR_RES.TXT', 'MQ.TXT', 'BPRO.TXT')
    reject limit unlimited;
    How can I place the MISSING FIELD VALUES ARE NULL for missing values for the sub_account?

    made the change I received this error:
    SQL> select * from ext_INCOMING_ORDERS_table;
    select * from ext_INCOMING_ORDERS_table
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-00554: error encountered while parsing access parameters
    KUP-01005: syntax error: found "no": expecting one of: "comma, date_format,
    defaultif, enclosed, ltrim, lrtrim, ldrtrim, notrim, nullif, optionally, ),
    rtrim, terminated"
    KUP-01007: at line 7 column 26
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_log_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\log';
    CREATE OR REPLACE DIRECTORY INCOMING_ORDERS_bad_dir
    AS 'c:\starpubs\starpubs\dataformats\logs\INCOMING_ORDERS\bad';
    create table ext_INCOMING_ORDERS_table (
    Account varchar(5),
    Sub_Account varchar(1),
    Override_Code varchar(1),
    Nomenclature varchar(28),
    chg_nbr varchar(3),
    quantity integer,
    U_I varchar(5),
    zipcode varchar(5),
    type_reject varchar(2)
    organization external
    type oracle_loader
    default directory user_dir
    access parameters
    records delimited by newline
    badfile INCOMING_ORDERS_bad_dir:'INCOMING_ORDERS%a_%p.bad'
    logfile INCOMING_ORDERS_log_dir:'INCOMING_ORDERS%a_%p.log'
    fields
    Account(1:5) char(5),
    Sub_Account(7:7) char(1) NO PRESERVE BLANKS,
    Override_Code(10:10) char(1),
    Nomenclature(11:38) char(28),
    chg_nbr(40:42) char(3),
    quantity(44:48) integer external,
    U_I(50:54) char(5),
    zipcode(56:60) char(5),
    type_reject(61:62) char(2)
    location('PTCLICK.MANUAL.NOMEN.TXT','PTCLICK.ORDERS.TXT', 'EUR_RES.TXT', 'MQ.TXT', 'BPRO.TXT')
    reject limit unlimited;

  • FND_PRODUCT_INSTALLATIONS TEMPORARY_TABLESPACE IS NULL FOR CUSTOM MODULE

    We have 11.5.10 ERP system for production use. But FND_PRODUCT_INSTALLATIONS TEMPORARY_TABLESPACE IS NULL FOR CUSTOM MODULE. All seeded modules are using TEMP.
    What are the ramifications for this.
    We have 'Change control' process in place. We can not update the table on fly. We need proper justification.
    Please help me understand, how this table drives Oracle applications and its performance.
    Thanks you all. in advance.
    Gopala Medapuram

    I agree with Hussein - we have several custom schemas that are registered in FND_PRODUCT_INSTALLATIONS, some of which have the tablespace info correctly filled out while others do not. All of our customizations in all these custom schemas are working as expected. So if your customizations are working as expected, I would not worry too much about it.
    HTH
    Srini

  • Error in Application log SCOM mgmt server 25934 Credentials are null for user

    Hi,   We recently started getting errors like the one shown below on one of our SCOM management servers.
    Any thoughts on what might be causing this and why this shows on a scom server.   There is no VMM stuff installed on this SCOM server.
    Thanks in advance.
    System
    Provider
    [ Name]
    Microsoft.SystemCenter.VirtualMachineManager.2012.Report.VMUsageCollection
    EventID
    25934
    [ Qualifiers]
    0
    Level
    2
    Task
    0
    Keywords
    0x80000000000000
    TimeCreated
    [ SystemTime]
    2014-01-28T18:08:24.000000000Z
    EventRecordID
    287618
    Channel
    Application
    Computer
    XXXX
    Security
    EventData
    Credentials are null for user:
    Thanks Lance

    Hi,
    If agent is installed on the VMM server, it will collect the information and send it to SCOM server. The event indicates the SCOM agent tried to access the registry key that was included in the User Profile but failed.
    Please specify a local account or domain account as the SCOM action account for a test.
    Niki Han
    TechNet Community Support

  • Getnode returned null for uri error for caldav server

    Hello,
    I am trying to install the Oracle UCS ( SUN 7 update 2 ) server.
    https://wikis.oracle.com/display/CommSuite7U2/Communications+Suite+on+a+Single+Host+%28Linux%29#CommunicationsSuiteonaSingleHost%28Linux%29-InstallingtheExample
    So far, I have successfully:
    Checked the installation requirements
    Installed Communications Suite 7 Update 2 Software
    Installed and Configured the Directory Server
    Prepared the Directory under ( Configuring Communications Suite Components )
    Configured Delegated Administrator and Communications CLI
    Configured Messaging Server
    Configured MYSQL Server
    Configured Calendar Server
    I have just installed a caldav server. I checked that it was enabled by running:
    # asadmin list-components -p <admin-port> --type=web
    davserver <web-module>
    Command list-components executed successfully.
    # asadmin show-component-status -p <admin-port> davserver
    Status of davserver is enabled.
    Command show-component-status executed successfully.
    that was from this page:
    https://wikis.oracle.com/display/CommSuite7RR92909/Calendar+Server+7+Troubleshooting
    In Firefox, I try to hit the suggested pages under "Testing Calendar accounts". However, this errors out every time for me.
    http://domain.com/davserver/dav/h/myDomain.com/myusername/calendar
    wheremyDdomain.com is my actual domain that I will not list here
    and myUsername is my actual username which I will not list here
    ( I edited both of these in the logs below )
    I checked my log in /var/opt/sun/comms/davserver/logs:
    INFO [2012-02-11T11:46:02.729-0500] <...DavServer.<init>> Server Startup succeeded
    INFO [2012-02-11T11:46:02.730-0500] <...DavServer.loadBackend> Loading backend defaultbackend with backendid defaultbackend
    INFO [2012-02-11T11:46:02.730-0500] <...DavServer.loadBackend>      JDBC JNDI Name = jdbc/defaultbackend
    INFO [2012-02-11T11:46:09.033-0500] <...DavServer.loadBackend> Loading backend ischedulebackend with backendid ischedulebackend
    INFO [2012-02-11T11:46:09.033-0500] <...DavServer.loadBackend>      JDBC JNDI Name = jdbc/ischedulebackend
    INFO [2012-02-11T11:46:09.427-0500] <...DavServer.loadBackends> iSchedule enabled
    INFO [2012-02-11T11:46:09.439-0500] <...DavServer.loadBackends> modified ischedule collection at /ischedule/
    INFO [2012-02-11T13:33:18.967-0500] <...URIInfoManagerImpl.getEntryFromSearchFilter> found 0 corresponding to: (uid=caldav)
    INFO [2012-02-11T13:33:59.844-0500] <...URIInfoManagerImpl.getEntryFromSearchFilter> found 0 corresponding to: (uid=caldav)
    FINE [2012-02-11T13:42:39.157-0500] <...DavServerServlet.service> [REQ] GET /davserver/browse/h/myDomainName/myUserName/calendar 127.0.0.1 myDomainName
    FINE [2012-02-11T13:42:39.808-0500] <...LDAPSingleHostPool.getConnection> got connection from getConnection() for pool Pool number:0. Host=myDomainName
    FINE [2012-02-11T13:42:41.441-0500] <...LDAPSingleHostPool.getConnection> got connection from getConnection() for pool Pool number:0. Host=myDomainName
    FINE [2012-02-11T13:42:41.460-0500] <...LoginModuleHelper.checkIfUserInAdminGroup> user: admin; isMemberOf = cn=Service Administrators, ou=Groups, o=isp
    FINE [2012-02-11T13:42:41.684-0500] <...DavBrowserServlet.service> Got a non standard condition: getNode returned null for uri /davserver/browse/h/myDomainName/myUserName/calendar
    FINE [2012-02-11T13:42:41.684-0500] <...DavServerServlet.service> [RES] [404] Command execution time: 2.527 secs
    I can hit this page from the browser:
    http://myDomainName:4848
    From my understanding, that is the admin port. That brings up the GlassFish server admin page.
    I do not remember creating a calendar account anywhere is my first thought. I followed the example deployment step by step so far and nowhere does it have me create a calendar user account. So, maybe there is no account at this point?
    So, my first question would be:
    How can I verify that I have a calendar account to begin with? ( or is this what I am doing by trying to log into the sites suggested under 'Test Calendar Accounts').
    My next question would be:
    What does this error mean: "getnode returned null for uri error for caldav server"?
    Spin off question from that:
    What should I do to fix that error?
    Thanks in advance!

    I did not put a slash at the end of the uris I was testing
    http://myDomain.com:80/davserver/browse/h/myDomain/myUserName/calendar
    http://myDomain.com:80/davserver/dav/h/myDomain/myUserName/calendar
    Once I put the slash at the end of the uri, the configuration page appeared and the error was not displayed about getNode anymore:
    http://myDomain.com:80/davserver/browse/h/myDomain/myUserName/calendar/
    http://myDomain.com:80/davserver/dav/h/myDomain/myUserName/calendar/

  • Adadmin error - DCPW null for "IZU" - aipspv(): Error setting up PDI list

    Hi,
    I am getting the folowing error while running adadmin
    Connecting to SYSTEM......Connected successfully.
    Connecting to APPLSYS......Connected successfully.
    AD Administration error:
    DCPW null for "IZU" [278]
    AD Administration error:
    Failed getting PDI list for product 'izu'
    AD Administration error:
    aipspv(): Error setting up PDI list for upgrade
    Already checked the metalink notes
    294354.1 Failed Getting Pdi List For Product 'Alr'
    211674.1 Autoupgrade Fails with Error setting up PDI listc
    171092.1 AutoPatch Error: aipspv()
    Checked the status of IZU product in fnd_product_installations
    What does this "DCPW" stand for ?
    adadmin complains of the value being null
    What should be the right value ?
    How can I update that ?
    Can someone please help to resolve the issue
    Thanks

    Hi Hussein
    FNDCPASS errored out with ORA-01403 error
    Also gave "Memory fault"
    dba_users and fnd_oracle_userid show that this user exists
    /apps/qtcstg > FNDCPASS apps/<pwd> 0 Y system/<pwd> ORACLE IZU IZU
    Log filename : L5504280.log
    Report filename : O5504280.out
    Memory fault
    /apps/qtcstg > cat L5504280.log
    Application Object Library: Version : 11.5.0 - Development
    Copyright (c) 1979, 1999, Oracle Corporation. All rights reserved.
    module:
    Current system time is 18-JAN-2007
    06:27:22
    APP-FND-02704: Unable to alter user IZU to change password.
    APP-FND-01564: ORACLE error 1403 in changepassword
    Cause: changepassword failed due to ORA-01403: no data found.
    The SQL statement being executed at the time of the error was: and was
    executed from the file &ERRFILE.

  • Equivalent select statement for complex selection

    HI,
    What is the equivalent select statement for below mentioned condition.
    SELECT-OPTIONS : SALEDOCU FOR VBAK-VBELN OBLIGATORY,
                     DATE     FOR VBAK-ERDAT OBLIGATORY,
                     CHANEEL  FOR VBAK-VTWEG,
                     SALETYPE FOR VBAK-AUART OBLIGATORY DEFAULT 'QT'
                     NO INTERVALS NO-EXTENSION.
    Regards,
    John.

    hi,
    you can use following code.
    tables vbak.
    data : begin of t_vbak occurs 0.
             include structure vbak.
    data : end of t_vbak.
    select * from vbak into table t_vbak where
                            vbeln in saledocu and
                            erdat in date and
                            vtweg in chaneel and
                            auart in saletype.
    Hope this helps.
    Regards,
    Shashank

  • How to scan for integers

    Hi, I'm trying to make a program that scans for multiples of tree. When the program is executed, you have to give the lower and upper limit and the program tells you how much multiples of tree are in the limit. I thought of making a loop where in the number is devided by tree, it can result as an integer or not, but how can i use the scanner to scan for integers??
    Greetings Jordy

    Hi, I'm trying to make a program that scans for
    multiples of tree. When the program is executed, you
    have to give the lower and upper limit and the
    program tells you how much multiples of tree are in
    the limit. I thought of making a loop where in the
    number is devided by tree, it can result as an
    integer or not, but how can i use the scanner to scan
    for integers??
    Greetings Jordy1. Are you talking about a tree or the number three?
    2. Why would you use Scanner to determine if a number is divisible by three? (Am I missing something).
    3. Loop through the range and use mod to determine if there is a remainder.

  • Hibernet query returns null for XMLTYPE data when I use oracle type4 driver

    Hi,
    I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
    Thanks in advance.
    regards,
    Amaresh

    Hi,
    I am using Oracle type-4 driver, My hibernet query returns null for data type XMLTYPE. But when I use BEA type -4 driver its working fine. Please help me to retrive XMLTYPE data using oracle-4 driver through hibernet query.
    Thanks in advance.
    regards,
    Amaresh

  • Equivalent Data Field for 0EXRATEXACC Info Object

    Hi Gurus,
    I have created a DSO using 2lis_13_VDITM data source by installing the same Info Source. Here i am not able to find the Equivalent Data Field for 0EXRATEXACC Info Object which is in Transfer Rules.
    So, Please let me know the Equivalent Data Field for 0EXRATEXACC Info Object.
    Points are assigned defenetely.
    Thanks in advance
    Peter B

    Hi,
    U have a field KURRF in table KURRF
    *Assign points if helpful.

  • ERROR: control_updates_flag is null for TASK ActivityID

    hi all:
    Cannot add new activities when importing XLS into P6 8.2Steps to Reproduce1.Create a test project and create 1 activity.2.Export the project using XLS format.3.Open the XLS sheet add an activity.4.Import the XLS sheet with the newly created activity.5 XLS sheet will not import note the error message in import log.:Excel Import log started : 15-Mar-12INFO: Importing Global Data...INFO: Importing Project Data...INFO: Importing: INFO: Saving: ERROR: control_updates_flag is null for TASK ActivityID: A1010
    for excample:
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0020, Project: N407 - Rev.2.03
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0030, Project: N407 - Rev.2.03
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0040, Project: N407 - Rev.2.03
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0050, Project: N407 - Rev.2.03
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0060, Project: N407 - Rev.2.03
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0070, Project: N407 - Rev.2.03
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0080, Project: N407 - Rev.2.03
    ERROR: control_updates_flag is null for TASK ActivityID: 407CSCAIC0090, Project: N407 - Rev.2.03

    Hello,
    thank you for help me,but this Problem is not resolved.I downloaded the patch,Installation in accordance with the documents:
    1.Download the P6Web_8.2.0.1.zip and extract the contents.
    2.Make a backup copy of your p6home directory containing your existing 8.2 installation.
    3.Copy p6.ear to your 8.2 p6home directory.
    4.Update your P6 configuration to the latest version in the P6 Administrator application:a.Run adminpv.cmd or adminpv.sh from your p6home directory.
    b.Login as the privileged user (for example, privuser).
    c.Right-click on the configuration name.
    d.Select Update to latest version.
    e.Click Save Changes.
    To add P6 as a WebLogic application:
    1.Launch the WebLogic Administration Console.
    Note: You can open the Administration Console via a web browser using this address: http://serverIP:listenport/console. The default listenport is 7001.
    2.In the Welcome window, log in using the user name and password that you created when you created the WebLogic domain.
    3.In the Change Center pane of the Administration Console, click Lock & Edit.
    4.In the Domain Structure pane, click Deployments.
    5.In the Summary of Deployments pane:a.Select p6.
    b.Click Update.
    6.In the Update Application Assistant pane:a.Verify the the path is correct for p6.ear file.
    If you need to change the path, click Change Path and navigate to the directory where p6.ear is located.
    b.Click Next.
    7.In the Update Application Assistant pane, review the configuration settings you have chosen, then click Finish to complete the update.
    To start the P6 application in WebLogic:
    1.In the Change Center pane, click Activate Changes.
    2.In the Domain Structure pane, click Deployments.
    3.In the Summary of Deployments pane, select p6.
    4.Verify that the State column for p6.ear shows Active.
    5.Logout of the Administration Console.
    6.Stop and restart the WebLogic application server.
    After the above steps, the new test and found that the import eppm p6 are still having problems after exsl data updates,
    To seek your help, thank you

  • Equivalent of LVC_FIELDCATALOG_MERGE for slis_t_fieldcat_alv

    Hi,
    i´m using FM "LVC_FIELDCATALOG_MERGE" for fieldcatalog type
    LVC_T_FCAT.
    is there an equivalent FM but for fieldcatalog type slis_t_fieldcat_alv? 
    Best regards.

    Hi,
    Check this..
    <b>  call function 'REUSE_ALV_FIELDCATALOG_MERGE'
        exporting
          i_program_name         = sy-repid
          i_internal_tabname     = 'ITAB'
          i_inclname             = sy-repid
        changing
          ct_fieldcat            = it_fldcat1[]
        exceptions
          inconsistent_interface = 1
          program_error          = 2
          others                 = 3.</b>
    if you are using itab and creating the fieldcat, and don't give i_inclname = sy-repid, it will not populate the fieldcat.
    Regards
    vijay

Maybe you are looking for

  • Use bindings for a variable in sql

    Hello, I have the following query: select request_number, ktna_notes.request_notes(20, &request_number) from request_table where request_number = &request_number the &request_number is a variable within the database. I need to implement this in my AD

  • Help. Windows Cannot Find Ipod,No charge through Firewire

    I have a 2nd gen Ipod 20g Window nor I tunes Recognizes the ipod And it wont even charge through the fire wire.. Please help   Windows XP  

  • Folder visibility

    Hello, I have a 'folder' share on my Windows Server 2008 Standard R2.  Within the shared folder, are several subfolders (each for my users).  NTFS/share permissions are set at the 'shared' folder level with subfolders inheriting the permissions.  How

  • How to hide password while entering into second page

    I have following script but while going into 2nd page from 1st page, ID and password are visible in adress bar.... <HEAD> <TITLE>T&E Profiling</TITLE> <STYLE> .headertxt { font-family : Arial; color : #FFFFFF; font-size : 14pt; font-weight : bold; fo

  • Printing Problem in IW3D-Duplicate Printing of Codes

    Hi Experts, While Printing Orders in IW3D , for a Particular Equipment Category of Equipments with Catalog Profile, i am getting repeat ( 2 times) printing of all the Codes for the Code Groups of that Catalog profile be it Object Part or Cause Code e