CubeSQL - Recursive queries don't work ?

  1. 2 weeks ago

    I have tried some basic recursive queries from CubeSQL and SQLite Manager from SQLabs.

    Both apps fail. I get a "Wrong context for the requested operation" error.
    Looks like "With" clause is unimplemented, but It is strange since SQlite version is 3.16.1

    Example

    WITH RECURSIVE
      cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000)
    SELECT x FROM cnt;  cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000)
    SELECT x FROM cnt;

    Anyone ever seen this ?
    I have contacted Marco, about this, but got no reply yet.

  2. 6 days ago

    Richard D

    Feb 16 Pre-Release Testers, Xojo Pro Europe (UK, London)

    i got "Wrong context for the requested operation" when using SQLiteManager with connect instead of Open.

    Maybe CubeSQL does not cater for Recursive yet

  3. I got a reply from Marco saying this will be fixed in a future update. hopefully....

  4. Richard D

    Feb 16 Pre-Release Testers, Xojo Pro Europe (UK, London)
    Edited 6 days ago

    @Roman V WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000) SELECT x FROM cnt; cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000) SELECT x FROM cnt
    ;

    how would one use the above with xojo code???

  5. Edited 6 days ago
    Dim SQL as String = "WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000) SELECT x FROM cnt;  cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000) SELECT x FROM cnt"
    
    Dim rs as RecordSet = MyDB.SQLSelect(SQL)
  6. Richard D

    Feb 16 Pre-Release Testers, Xojo Pro Europe (UK, London)

    @Roman V Dim SQL as String = "WITH RECURSIVE cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000) SELECT x FROM cnt; cnt(x) AS (VALUES(1) UNION ALL SELECT x+1 FROM cnt WHERE x<1000000) SELECT x FROM cnt" Dim rs as RecordSet = MyDB.SQLSelect(SQL)

    thanks

or Sign Up to reply!