[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: Dynamic query



Shuba,
I think you should be able to find more details in our
archive.
One of the method is, you can build a dynamic variable
by concating all the selected fields to looks like
this

lET $TEMP = EMPLID || ',' || JOBCODE || ',' || RATE_1


and you can use this dynamic variable in your begin
select.

ex
begin-select
[$test] &test=char
from table1,table2
end-select

The column variable &test is already in CSV format
which you can use directly write to the output CSV
file.

Hope this helps
Arun
--- "Sangameswaran Subathra (KAWP 12)"
<subathra.sangameswaran@CSFS.COM> wrote:
> Hi,
>
> I want to input as parameter, all the
> 'select-fields' for my query.
> The no. of fields I want to select each time is also
> uncertain.
> I plan to get all the fields as separated by commas
> which I can parse and count.
> But how do I use the same in the 'begin-select'
> clause?
> The resultset I require is just a csv file.
> Therefore I think I will not encounter any problem
> in writing the results.
> If anybody have done this before, or has any idea as
> to how this can be done, could you please help me?
>
> Thanks and best regards,
> Subha.


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/