Several rows from Dual
Date: Thu, 12 Feb 2009 09:33:18 -0800 (PST)
for some reason I need something like a "select 123 as abc from dual;" but with several result rows rather than one. The result should look like
So I came up with the following solution which seems akward to me:
(SELECT level abc FROM dual CONNECT BY level <= 999 ) WHERE abc IN(123, 456, 789) ;
It was essential to me that I could easyly change the number of results like here through just writing them between the brackets, otherwise I could have used a UNION statement. But my solution looks ugly, especially the "<=999" because I will need it for bigger than 3 digit numbers. Does anybody know a better solution?
Thanks and best,
Hans Received on Thu Feb 12 2009 - 11:33:18 CST