Skip to Content
0
Feb 23, 2011 at 07:45 AM

Absolute dynamic select query with dynamic join and where

2217 Views

Has anyone ever tried creating an absolutely dynamic SELECT query with dynamic Join and Where conditions.

I have a requirement of creating such a query in an Utility Class, and i have written the code. But its throwing my sysntax errors.

Please let me know where am I going wrong OR is it really possible to create such a dynamic Query??


    SELECT (FIELDS) INTO TABLE IT_TABLES 
      FROM ( (ME->TABLE1)  inner join ( me->table2 )
      on ( on_condition ) )
      WHERE (me->where_fields).

Ags.