1. *** New version of B4J is available ***
    B4J v7.8
    Dismiss Notice

Android Question [SOLVED] REPLACE INTO

Discussion in 'Android Questions' started by makis_best, Jun 19, 2019.

  1. makis_best

    makis_best Active Member Licensed User

    Hi.

    The "REPLACE INTO" sqlite command will work in B4A?

    Thank you
     
  2. DonManfred

    DonManfred Expert Licensed User

    It is part of the SQLite language. Why it should not work? Do you get any error using it?
     
    BillMeyer likes this.
  3. makis_best

    makis_best Active Member Licensed User

    The only problem I have is that I can't use two conditions using it
    I mean I have a table created...
    Code:
    CREATE TABLE IF NOT EXISTS positions (
        
    id integer PRIMARY KEY,
        title text 
    NOT NULL,
        min_salary numeric,
          
    tts String
    );
    I want to do a replace into when the id is known and the tts differ.

    Something like
    Code:
    REPLACE INTO positions (id, title, min_salary, tts)
    VALUES
        (
    2'New Sullary', 1100, 'Full') WHERE tts <> 'Low';
     
  4. DonManfred

    DonManfred Expert Licensed User

  5. makis_best

    makis_best Active Member Licensed User

    Nice like @DonManfred
    Well done... Work like a charm
     
  6. AnandGupta

    AnandGupta Active Member Licensed User

Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice