imem icon indicating copy to clipboard operation
imem copied to clipboard

Wrong SQL generation

Open c-bik opened this issue 9 years ago • 3 comments
trafficstars

image

The equivalent correct SQL is:

select
    cvalue:SHORTID shortid,
    nth(3,ckey ) contype,
    ckey,
    cvalue
  from
    sbsgui.tpac
  where
      not cvalue:SHORTID in ('''$not_a_value''','')
      and (
          ckey like '["tpac"%"lacon"%'  or
          ckey like '["tpac"%"ipcon"%'  or
          ckey like '["tpac"%"mlcon"%')
    and
    rownum < 1000000

c-bik avatar Jan 14 '16 07:01 c-bik

One more image

c-bik avatar Apr 17 '19 08:04 c-bik

I just did a test with sqlparse and it looks okay.

walter-weinmann avatar Apr 17 '19 09:04 walter-weinmann

@walter-weinmann Generating SQL from filter settings is quite tricky, especially support for Oracle and imem which have a different type system.

SQL must always be checked by the user after filtering (before storing the DDerl view or running the query by SQL).

stoch avatar Apr 17 '19 13:04 stoch