Quantcast
Viewing all articles
Browse latest Browse all 207

oracle working with CTE with condition

DEFINE fromtable1= true;WITH firstQuery AS (  SELECT columns FROM table),secondQuery AS (  SELECT columns FROM second_table)  IF @fromtable1= true  BEGIN      SELECT *      FROM   firstQuery   ENDELSE  BEGIN      SELECT *      FROM   secondQuery   END

In oracle I tried above but I get error is there a way to make a query like this


Viewing all articles
Browse latest Browse all 207

Trending Articles