Quantcast
Channel: Active questions tagged cte - Database Administrators Stack Exchange
Viewing all articles
Browse latest Browse all 207

oracle working with CTE with condition

$
0
0
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



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>