4 Replies Latest reply on Apr 26, 2013 4:14 PM by Amatu Allah Neveen Ebrahim

    join with another table in pre-query

      We have a large data block and we need to order some columns based on street name for example, not id. The base table of db block contains an id_street column, and 'streets' table contains id and name.
      Ok, in pre-query trigger of that block, we have a complex logic and we dynamically build the where clause. At the end, we set the order_By clause of the block, to order the rows, for example we need to order by the 'my_date' column asc (it's a date type column), and street desc; but street NAME, not id. We don't want to use a from clause query, because the dynamically where clause logic it's complex.
      How can we join the db block table with 'streets' table in pre-query, so when constructing the order by clause to specify something like
      set_block_property('ADRESE_NEZONATE', order_by, 'my_date, name desc');
      where 'name' is the name of the street, from the 'streets' table.
      Is it possible in pre-query, somehow? Or, in my case where can I join with that table and use that column in pre-query at setting order by?

      Edited by: Roger25 on 26.04.2013 12:31