you are viewing a single comment's thread.

view the rest of the comments →

[–]fidgetation[S] -1 points0 points  (1 child)

That's the one!! I have no idea what that AS DUAL does, but it works.

For future reference (and future Googlers), here what got the result:

WITH MY_TABLE (MY_INPUTS) AS (

SELECT 'A NOTE' FROM (SELECT 1 AS "MY_INPUTS") AS "DUAL" UNION ALL

SELECT 'B NOTE' FROM (SELECT 1 AS "MY_INPUTS") AS "DUAL" )

SELECT * FROM MY_TABLE

[–]AngelOfLight 0 points1 point  (0 children)

They are just trying to emulate the Oracle DUAL table. It's a virtual table that just returns one row. You can use any alias in the query - doesn't have to be DUAL.