Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

temp table or something

Status
Not open for further replies.

mikedaruke

Technical User
Mar 14, 2005
199
0
0
US
If I have 10 values I want to put in a temporary table, or somewhere where I can do an outer join real quick to see if they match, if they don't i want null.

So I have 10 values like

Peter
Bob
Christine
Mike
Jack
etc

Just want something like

Name
Peter
Bob
chistine
etc

This way I can out join and show the matches and null for none.

Make sense? I tried select peter, bob from dual, but that puts in a columns not rows.
 
One option would be:

Code:
select 'peter' as colname
from dual
union all
select 'bob'
from dual
union all
...

But probably not very practical if you have a large number.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top