Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- idclient,
- id,
- name,
- iditemtype,
- price
- FROM items
- WHERE LOWER(name) LIKE '%' || LOWER(xdb_access.cnv(in_find) || '%')
- AND isVisible = 1
- AND xdb_access.equalsDateMinute(sysdate, isonline) <= t_time_online
- AND idclient != in_idclient
- GROUP BY idclient
- select * from
- (
- SELECT
- idclient,
- id,
- name,
- iditemtype,
- price,
- row_number() over (partition by idclient order by idclient) rn
- FROM items
- WHERE LOWER(name) LIKE '%' || LOWER(xdb_access.cnv(in_find) || '%')
- AND isVisible = 1
- AND xdb_access.equalsDateMinute(sysdate, isonline) <= t_time_online
- AND idclient != in_idclient
- GROUP BY idclient
- )
- where rn = 1
- select * from
- (
- SELECT
- idclient,
- id,
- name,
- iditemtype,
- price,
- row_number() over (partition by idclient order by idclient, id, name,
- iditemtype, price) rn
- FROM items
- WHERE LOWER(name) LIKE '%' || LOWER(xdb_access.cnv(in_find) || '%')
- AND isVisible = 1
- AND xdb_access.equalsDateMinute(sysdate, isonline) <= t_time_online
- AND idclient != in_idclient
- )
- where rn = 1
Add Comment
Please, Sign In to add comment