Solved

select two rows from dual?

Posted on 2001-06-07
3
1,004 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

Suggested Solutions

Title # Comments Views Activity
MULTIPLE DATE QUERY 15 91
how to trim oracle sql sentence in unix 17 60
Input a SQl, output tables amd columns used in the SQL 19 55
Migration from sql server to oracle 5 26
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to copy an entire tablespace from one database to another database using Transportable Tablespace functionality.

831 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