Solved

select two rows from dual?

Posted on 2001-06-07
3
1,003 Views
Last Modified: 2007-12-19
ok this seems easy enough, but i havent been able to find a solution.

i want to make a query from the DUAL table that returns two rows of data like this:

DUAL
-----
N
Y


i know that "select 'N' from dual" can give you 1 row, but i want both. and no, i do not want to create a dummy table. i want this to all be on the fly.

0
Comment
Question by:dougtimms
3 Comments
 
LVL 3

Accepted Solution

by:
sidcap earned 50 total points
ID: 6165434
why don't you try using "union" ?

select 'N' from dual union select 'N' from dual

SIDCAP.
0
 
LVL 2

Expert Comment

by:jammalk
ID: 6165469
U can try this too..!
SQL> select 'Y'||chr(10)||'N' from dual;

'Y'
---
Y
N

Whats the purpose of this.... ?
0
 

Author Comment

by:dougtimms
ID: 6165487
Thanks a lot...exactly the answer i was looking for.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question