Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

String literal result set

Hopefully this is the right place to ask this question.

I want to return a result set that has nothing to do with tables.
In other DBMS's I can run the following select clause:

select 'a','b'

and get the following result set

1 2
-- --
a b

Is there a way to do something similar in UDB. I tried the above and it
does not work.

Can you email me if you have the answer? Thanks in advance.
[484 byte] By [Hector Diaz] at [2007-11-9 18:52:11]
# 1 Re: String literal result set
Hi,
Use

VALUES ('a','b')

or, in older versions, use

SELECT ('a','b') from sysibm.sysdummy1

--Greg
Hector Diaz wrote:

> Hopefully this is the right place to ask this question.
>
> I want to return a result set that has nothing to do with tables.
> In other DBMS's I can run the following select clause:
>
> select 'a','b'
>
> and get the following result set
>
> 1 2
> -- --
> a b
>
> Is there a way to do something similar in UDB. I tried the above and it
> does not work.
>
> Can you email me if you have the answer? Thanks in advance.
Greg Nash at 2007-11-11 23:59:31 >