Home » SQL & PL/SQL » SQL & PL/SQL » 'Free text' select statment (Oracle 4.0.2.15.21)
'Free text' select statment [message #638723] Fri, 19 June 2015 03:28 Go to next message
SteveShephard
Messages: 41
Registered: August 2012
Member
Hi all,

Is it possible to list different 'free text' values within a given column name.

For example I would like to return the following:

MY_DATA
a
b
c

None of this data is stored with a table so it would have to be selecting from dual. Obviously you can do select 'a' from dual, but this then gives the column name and value of 'a'.

Not sure it is possible but thought I would ask the question.

Thanks Smile
Re: 'Free text' select statment [message #638729 is a reply to message #638723] Fri, 19 June 2015 03:39 Go to previous messageGo to next message
pablolee
Messages: 2882
Registered: May 2007
Location: Scotland
Senior Member
select 'a' my_data from dual union all
select 'b' my_data from dual
Re: 'Free text' select statment [message #638737 is a reply to message #638723] Fri, 19 June 2015 06:54 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Also always post your Oracle DATABASE version, with 4 decimals.

Previous Topic: Split rows into columns
Next Topic: Generate Start - End date
Goto Forum:
  


Current Time: Fri Apr 19 21:08:33 CDT 2024