25
Views
3
Comments
Solved
Is it possible to use WITH clause twice in single OutSystem Advances SQL
Question

I am trying to use an advances SQL query on OutSystem 11 something like below:


WITH y 

AS

(

  SELECT * 

  FROM MyTable

  WHERE [base_condition]

),

x

AS

(

  SELECT * 

  FROM y

  WHERE [something_else]

)

SELECT * 

FROM x WHERE [something_else]

UNION 

SELECT * 

FROM x WHERE [something_else];


Is this possible?

Rank: #70
Solution

Hi Priya,


At least if you're running on a SQL Server database, yes it is possible.

 

Regards,
João

Rank: #448

Hi Priya,

You can use all the SQL functions, if you have SQL Server as backend database.

Thanks & Regards,

Sachin

mvp_badge
MVP
Rank: #2

Hi Priya,

Do you have reasons to assume this isn't possible? You could simply try out and conclude it works :).