Page 1 of 1

how to select column dynamically

Posted: Mon Apr 12, 2010 3:15 am
by datastagedw
I have the following requirement:

i have a perl script generating a list of values in a file as output. these values are available under one field in the file. i want to send this field (along with values) as a column in the column list while using select clause on some table. the select clause also contains one/more other columns in the column clause. Th select clause may appear like this:

select col1,col2,'#parameter# from table1;

here the parameter is nothing but the file having some distinct list of values.

please let me know if any other information is required

Re: how to select column dynamically

Posted: Mon Apr 12, 2010 3:27 am
by ray.wurlod
datastagedw wrote:I have the following requirement:
...
please let me know if any other information is required
Why?

What is it meant to achieve?

A list of constant values in a SELECT statement will generate those constants for every row selected.