?
Solved

select two rows from dual?

Posted on 2001-06-07
3
Medium Priority
?
1,009 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 3

Accepted Solution

by:
sidcap earned 200 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
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.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to recover a database from a user managed backup
Suggested Courses

764 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