Recognize NULL value in editable report

(2 posts) (2 voices)
  1. cris, Member

    I am stuck trying to pass a NULL value in an editable report back to the table. So if I 'clear' an existing integer using the backspace key (or the delete key) in an in-place editable report, I can't get the report that is doing the actual updating to recognize the parameter as NULL. Here is the procedure for the report doing the updating.

    DROP PROCEDURE IF EXISTS sp_DBR_ETCA $$ CREATE PROCEDURE `sp_DBR_ETCA`( inTCID int, inIC int ) BEGIN

    IF inIC IS NOT NULL THEN update smi_test.TrCt tc set tc.InsCt = inIC where tc.TCtID=inTCID; ELSE update smi_test.TrCt tc set tc.InsCt = NULL where tc.TCtID=inTCID;

    END IF ;

    END $$

    I have tried various variations:
    IF (inIC IS NOT NULL) THEN
    IF ISNULL(inIC) THEN
    IF inIC >= 0 THEN
    IF inIC IS NULL THEN

    But I can't get the NULL recognized.

    Thank you,

    Cris

  2. myDBR Team, Key Master

    Cris,
    run the updater and you can simply use:

    DROP PROCEDURE IF EXISTS sp_DBR_ETCA
    $$
    CREATE PROCEDURE `sp_DBR_ETCA`(
    inTCID int,
    inIC int
    )
    BEGIN update smi_test.TrCt
    set InsCt = inIC
    where TCtID=inTCID; END
    $$

    --
    myDBR Team


Reply

You must log in to post.