Can't update a sql-table with a space

Hello,
In a transaktion I'm getting some Values from a SAP-ERP System via JCO.
I update a sql-table with this values with a sql-query command.
But sometimes the values I get from SAP-ERP are empty (space) and I'm not able to update the sql-table because of a null-value exception. (The column doesn't allow null-values). It seems that MII thinks null and space are the same.
I tried to something like this when passing the value to the sql-query parameter but it didn't work:
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", " ")
this works but I don't want to have a "_"
stringif( Repeater_Result.Output{/item/SCHGT} == "X", "X", "_")
Any suggestions?
thank you.
Matthias

The problem is Oracle doesn't know the space function. But it knows a similar function: NVL --> replaces a null value with something else. So this statement works fine for me:
update marc set
LGort = '[Param.3]',
dispo = '[Param.4]',
schgt = NVL('[Param.5]', ' '),
dismm = '[Param.6]',
sobsl = NVL('[Param.7]',' '),
fevor = '[Param.8]'
where matnr = '[Param.1]' and werks = '[Param.2]'
If Param.5 or Param.7 is null Oracle replaces it with a space in every other case it is the parameter itself.
Christian, thank you for your hint with the space function. So I remembered the NVL-function.
Regards
Matthias

Similar Messages

  • Can't update app! Even with sufficient space!

    This is the first time i've received this message. I am currently trying to update a game called RAGE HD, and whenever I try to do so, it says "There is not enough space to download "RAGE HD". Please delete some photos or videos."
    I don't understand why it would say this, since I know for a fact i have 1.77 GB of free space left on my iPhone, and the update just can't be 1.77 GB since the game itself isn't even that large.
    I have 3.9 GB of apps on my iPhone, so I'm wondering is there a certain amount of apps you can have on your iPhone or something?

    Many apps require twice or more of their installed space to install. Rage HD is a ~750MB app & requires a minimum of 1.5GB's or more to install. You have no choice but to free up space if you want to install this app. You'll get the space back once the app is installed.

  • How can I load data into table with SQL*LOADER

    how can I load data into table with SQL*LOADER
    when column data length more than 255 bytes?
    when column exceed 255 ,data can not be insert into table by SQL*LOADER
    CREATE TABLE A (
    A VARCHAR2 ( 10 ) ,
    B VARCHAR2 ( 10 ) ,
    C VARCHAR2 ( 10 ) ,
    E VARCHAR2 ( 2000 ) );
    control file:
    load data
    append into table A
    fields terminated by X'09'
    (A , B , C , E )
    SQL*LOADER command:
    sqlldr test/test control=A_ctl.txt data=A.xls log=b.log
    datafile:
    column E is more than 255bytes
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)
    1     1     1     1234567------(more than 255bytes)

    Check this out.
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96652/ch06.htm#1006961

  • In OWB I need to update the target table with same field for match/update

    In OWb I am trying to update the target table with the match and the update on the same field can this be done. I am getting a error match merge error saying you cannot update and match on the same field. But in SQl my select is
    Update table
    set irf = 0
    where irf = 1
    and process_id = 'TEST'
    Hwo do i do this in OWB.

    table name is temp
    fields in the table
    field1 number
    field2 varchar2(10)
    field3 date
    values in the table are example
    0,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    In the above example I need to update the first row field1 to 1.
    Update temp
    set field1 = 1
    where field1 = 0
    and field2 = 'TEST'
    when I run this I just need one row to be updated and it should look like this below
    1,'TEST',05/29/2009
    9,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009
    But when I run my mapping I am getting the rows like below the second row with 9 also is getting updated to 1.
    1,'TEST',05/29/2009
    1,'TEST',05/29/2009
    0,'TEST1',03/01/2009
    1,'TEST1',03/01/2009

  • Updating an oracle table with data from an xml string

    Hi - I need help with the following problem:
    We have a table in the database with a field of xml type. We are going to take each string that gets inserted into the xml type field in the 'xml table' and parse the data into another oracle table with corresponding fields for every element.
    once the record gets inserted into the 'real table' the user might want to update this record they will then insert another record into the 'xml table' indicating an update(with a flag) and then we need to update the 'real table' with the updated values that have been sent in.
    The problem that I am having is that I do not know how to create this update statement that will tell me which fields of the table need to be updated.(only the fields that need to be updated will be in the xml string in the 'xml table').
    Please help me with this - ASAP!

    Are you wanting to upload the file through an Oracle Form or just upload a file? If it isn't via forms, then you should probably post your question here: {forum:id=732}
    You also should post the version of Forms, Database, etc...
    As far as uploading files via a text file, I personally like to use Oracle External Tables even in Forms. You can Google that and there is plenty of information. If you search this forum, then you will see lots of people use UTL_FILE in forms, but you can Google that also for more information.

  • How can I update a customized table from a text document?

    Hi,
    I am one sample file. The file is an text document. From this .txt file how can I update a customized table in SAP.
    How can I Update the fields in the Customized table.
    Thanks & Regards,
    NManohar.

    use the Function module GUI_UPLOAD or WS_UPLOAD and give the path and the file name from where the data has to be uploaded. in table parameter give the iternal table
    CALL FUNCTION 'GUI_UPLOAD'
      EXPORTING
        filename                      =
      FILETYPE                      = 'ASC'
      HAS_FIELD_SEPARATOR           = ' '
      HEADER_LENGTH                 = 0
      READ_BY_LINE                  = 'X'
      DAT_MODE                      = ' '
      CODEPAGE                      = ' '
      IGNORE_CERR                   = ABAP_TRUE
      REPLACEMENT                   = '#'
      CHECK_BOM                     = ' '
      VIRUS_SCAN_PROFILE            =
      NO_AUTH_CHECK                 = ' '
    IMPORTING
      FILELENGTH                    =
      HEADER                        =
      tables
        data_tab                      =
    EXCEPTIONS
      FILE_OPEN_ERROR               = 1
      FILE_READ_ERROR               = 2
      NO_BATCH                      = 3
      GUI_REFUSE_FILETRANSFER       = 4
      INVALID_TYPE                  = 5
      NO_AUTHORITY                  = 6
      UNKNOWN_ERROR                 = 7
      BAD_DATA_FORMAT               = 8
      HEADER_NOT_ALLOWED            = 9
      SEPARATOR_NOT_ALLOWED         = 10
      HEADER_TOO_LONG               = 11
      UNKNOWN_DP_ERROR              = 12
      ACCESS_DENIED                 = 13
      DP_OUT_OF_MEMORY              = 14
      DISK_FULL                     = 15
      DP_TIMEOUT                    = 16
      OTHERS                        = 17
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    and finally use insert command to update the database table with the data

  • PL/SQL table with several arguments

    Hi All!
    I need a pl/sql table with several arguments. It should looks like this:
    DECLARE
    CURSOR C1
    IS
    SELECT ARTICLE_ID,
    SALES_SECTION_ID,
    COUNTRY_ID,
    COLL_OF_DATA_TYPE_ID,
    SYSTEM_ID
    FROM F_IPV_BASE;
    CURSOR C2
    IS
    SELECT ARTICLE_ID,
    SALES_SECTION_ID,
    COUNTRY_ID,
    COLL_OF_DATA_TYPE_ID,
    SYSTEM_ID,
    COUNT (ALL ORDER_POSITION_NO) CREDIT_NOTE_POS_QTY
    FROM F_IPV_BASE
    WHERE DAY_ID BETWEEN tFirstDayofMonth AND tLastDayofMonth
    AND BILLING_METHOD_ID = (SELECT BILLING_METHOD_ID
    FROM K_BILLING_METHOD
    WHERE SRC_BILLING_METHOD_ID = '2')
    GROUP BY ARTICLE_ID,
    SALES_SECTION_ID,
    COUNTRY_ID,
    COLL_OF_DATA_TYPE_ID,
    SYSTEM_ID;
    TYPE CREDIT_NOTE_POS_QTY_REC IS RECORD (
    ARTICLE_ID F_IPV_BASE.ARTICLE_ID%TYPE,
    SALES_SECTION_ID F_IPV_BASE.SALES_SECTION_ID%TYPE,
    COUNTRY_ID F_IPV_BASE.COUNTRY_ID%TYPE,
    COLL_OF_DATA_TYPE_ID F_IPV_BASE.COLL_OF_DATA_TYPE_ID%TYPE,
    SYSTEM_ID F_IPV_BASE.SYSTEM_ID%TYPE,
    CREDIT_NOTE_POS_QTY NUMBER
    TYPE CREDIT_NOTE_POS_QTY_TYP IS TABLE OF CREDIT_NOTE_POS_QTY_REC
    INDEX BY VARCHAR2 (30);
    CREDIT_NOTE_POS_QTY_TAB CREDIT_NOTE_POS_QTY_TYP;
    tPosQTY NUMBER := 0;
    BEGIN
    FOR TmpRec1 IN C2
    LOOP
    CREDIT_NOTE_POS_QTY_TAB (TmpRec1.ARTICLE_ID, TmpRec1.SALES_SECTION_ID, TmpRec1.COUNTRY_ID, TmpRec1.COLL_OF_DATA_TYPE_ID, TmpRec1.SYSTEM_ID).CREDIT_NOTE_POS_QTY := TmpRec1.CREDIT_NOTE_POS_QTY;
    END LOOP;
    FOR TmpRec1 IN C1
    LOOP
    IF (CREDIT_NOTE_POS_QTY_TAB.EXISTS (TmpRec1.ARTICLE_ID, TmpRec1.SALES_SECTION_ID, TmpRec1.COUNTRY_ID, TmpRec1.COLL_OF_DATA_TYPE_ID, TmpRec1.SYSTEM_ID) = TRUE)
    THEN
    tPosQTY := CREDIT_NOTE_POS_QTY_TAB (TmpRec1.ARTICLE_ID, TmpRec1.SALES_SECTION_ID, TmpRec1.COUNTRY_ID, TmpRec1.COLL_OF_DATA_TYPE_ID, TmpRec1.SYSTEM_ID).CREDIT_NOTE_POS_QTY;
    ELSE
    tPosQTY := 0;
    END IF;
    END LOOP;
    END;
    I get PLS-00316 in loops.
    Any help will be appreciated.
    With best regards,
    Andrej Litowka.

    Hi
    the .exists(n#) method will just check if the n# element exists. there is no build in function to locate or compare record or who oracle says;
    Comparing Records
    Records cannot be tested for nullity, or compared for equality, or inequality.
    If you want to make such comparisons, write your own function that accepts two records as parameters and does the appropriate checks or comparisons on the corresponding fields.

  • Can i update my iphone 3G with IOS 4.1 to IOS 5?, can i update my iphone 3G with IOS 4.1 to IOS 5?

    can i update my iphone 3G with IOS 4.1 to IOS 5?, can i update my iphone 3G with IOS 4.1 to IOS 5?

    wheewhee wrote:
    can i update my iphone 3G with IOS 4.1 to IOS 5?, can i update my iphone 3G with IOS 4.1 to IOS 5?
    No
    It will only go to 4.2.1

  • Can't use ";" in sql clause with Oracle 8.X

    Can't use ";" in sql clause with Oracle 8.X
    I can't use ";" at the ending of sql clause in VB program. First this program can use with Oracle 7.3.4 database. But now i need to upgrade DB to Oracle 8.1.7 ,program can't operate. It show error Runtime 40002
    and 37000:ODBC driver for oracle/invalid charactor
    Thankyou

    I've seen a lot of discussion about semicolons in SQL
    sent from 3rd party applications. A web search should
    bring up the discussions.
    Also you might get more response if you ask this question
    somewhere else. This is not a VB forum, so you may
    not reach relevant people.
    -- CJ

  • Can anybody give me the table with tcode and its development class

    can anybody give me the table with tcode and its development class

    Hi phani,
    1) First retrieve program name from tstc table I.e field pgmna.
      2) Using pgmna retrieve from tadir table by using the following criteria from tadir table
       pgmid    = 'R3TR'
      AND object   = 'PROG'
      AND obj_name = tstc-pgmna.
    We will get development class or package in tadir i.e
    tadir-devclass 
    Thanks,
    Naveen Kumar.

  • Populate SQL table with data from Oracle DB in ODI

    Hi,
    I am trying to populate a source SQL table with fields from an Oracle db in ODI. I am trying to perform this using a procedure and I am am getting the following error:
    ODI-1226: Step PROC_1_Contract_Sls_Person_Lookup fails after 1 attempt(s).
    ODI-1232: Procedure PROC_1_Contract_Sls_Person_Lookup execution fails.
    ODI-1228: Task PROC_1_Contract_Sls_Person_Lookup (Procedure) fails on the target MICROSOFT_SQL_SERVER connection Phys_HypCMSDatamart.
    Caused By: weblogic.jdbc.sqlserverbase.ddc: [FMWGEN][SQLServer JDBC Driver][SQLServer]Invalid object name 'C2C_APP.CON_V'.
    My question is what is the best method to populate SQL db with data from an Oracle db? Using a procedure? A specific LKM?
    I found threads referring to using an LKM to populate Oracle tables with data from a SQL table....but nothing for the opposite.
    Any information would help.
    thanks,
    Eric

    Hi Eric,
    If using an Interface, I would recommend the LKM SQL to MSSQL (BULK) knowledge module. This will unload the data from Oracle into a file, then bulk load the staging db on the target using a BULK INSERT.
    Regards,
    Michael Rainey

  • How can I update the trigger table?

    I need a insert trigger on a table and also wants to insert the result value in one of its field.
    it gives mutating error........
    so wots the way of updating it? how can i update the same table.

    For example like this (inside the BEGIN/END section of the trigger):
    :NEW.Col2 := :NEW.Col1;
    C.

  • How can i update the ADRT table REMARK field

    How can i update the ADRT table REMARK field
    by using only function modules or BAPI's not by direct update's
    please help me
    i need it urgently

    Hi,
    you can try this code:
        SELECT SINGLE * FROM KNA1 WHERE KUNNR = wa_kunnr.
        IF sy-subrc = 0.
          CLEAR adrct.
          SELECT SINGLE * FROM adrct WHERE addrnumber = kna1-adrnr.
          IF sy-subrc = 0.
            adrct-remark = wa_remark.
            MODIFY adrct.
          ENDIF.
        ENDIF
    best regards,
    Thangesh

  • Can i update my iphone 3g with IOS5...?

    can i update my iphone 3g with IOS5...?

    No. iOS 4.2.1 is the end of the line for your phone.

  • How can I update my iPhone 4 with out all my pictures or music erasing ?

    How can I update my iPhone 4 with out all my pictures or music erasing ?

    All of your music and pics should be on your computer.
    If they are not, then put them there.

Maybe you are looking for

  • Need suggestion regarding simulation of Java Card using a floppy

    Hi All, I am working on a project wherein I have to simulate a Java Card application using a floppy. I am writing my own Card Terminal and CardTerminalFactory. Thats what I have started working on. Will that serve the purpose or do I have to think ab

  • Editing TEXT in WORD file.

    Hi, Is it possible to EDIT a text file (word) from FORMS 10g. Let's say I want to FIND and REPLACE text in a word file. Is there any tools or JAVA code that can help me achieve this? Thanks in advance, Marc.

  • I have a problem in select-options

    hi frns,          i am facing a big problem in select-options the requirement is such that i have 2 select-options one for matnr and the other for maktx so wen the clent select matnr with f4 in the maktx the similar description should come by using f

  • Default name for saving report output

    Hi, I created an Oracle Report that is run via the rwservlet. Users will be prompted to view/save the output when destype=cache and desformat=pdf, spreadsheet, or delimiteddata. When they try to save the output, the default file name is rwservlet.pdf

  • Wlan connection BB curve 8310

    Any tips and is it indeed possible to connect this phone to my wireless network at home office?