[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR Question: Getting Values of Dynamic Columns in select
- Subject: Re: SQR Question: Getting Values of Dynamic Columns in select
- From: Ashish Bhatt <ashish_bhatt@HOTMAIL.COM>
- Date: Sun, 21 Oct 2001 12:33:43 -0700
- References: <NEBBLIJMANLPIMKGLGBBOENCLGAA.holger@noreke.com>
When I say
Write 1 from $c1
Then I get all column names in the file not the data.
----- Original Message -----
From: "Holger Noreke" <holger@noreke.com>
To: "Ashish Bhatt" <ashish_bhatt@hotmail.com>
Sent: Saturday, October 20, 2001 11:31 AM
Subject: RE: Re: SQR Question: Getting Values of Dynamic Columns in select
> What you can do is create another procedure to call, which populates $C1.
> It could look something like this (if you are using Oracle, otherwise
change
> the table name based on the database you are using.)
>
> BEGIN-PROCEDURE GET-COLUMNS
>
> LET $C1 = ''
> BEGIN-SELECT
> COLUMN_NAME
> IF $C1 = ''
> LET $C1 = &COLUMN_NAME
> ELSE
> LET $C1 = $C1 || ', ' || &COLUMN_NAME
> END-IF
> FROM ALL_TAB_COLUMNS
> WHERE TABLE_NAME = [$TABLE_NAME]
> END-SELECT
>
> END-PROCEDURE
>
> BEGIN-PROCEDURE ASHISH
>
> DO GET-COLUMNS
>
> Begin-select
> $c1
> do Write-Data
> from [$table_name]
> where AUDIT_STAMP < SYSDATE - 1300
> end-select
>
> END-PROCEDURE
> .
> .
> .
>
>
>
> Let me know how you make out.
>
> > -Holger Noreke
> > Noretec Consulting Group, Inc.
> hnoreke@noretec.com
>
> -----Original Message-----
> From: Ashish Bhatt [mailto:ashish_bhatt@hotmail.com]
> Sent: Saturday, October 20, 2001 8:16 AM
> To: sqr-users@list.iex.net; holger@NOREKE.COM
> Subject: Re: Re: SQR Question: Getting Values of Dynamic Columns in
> select
>
> I did this yesterday. But how to get the values.
>
> ----- Original Message -----
> From: "Holger Noreke" <holger@NOREKE.COM>
> To: <SQR-USERS@list.iex.net>
> Sent: Saturday, October 20, 2001 11:05 AM
> Subject: Re: SQR Question: Getting Values of Dynamic Columns in select
>
>
> > Ashish,
> >
> > Try [$C1] instead of $C1
> >
> > -Holger Noreke
> > Noretec Consulting Group, Inc.
> > hnoreke@noretec.com
> >
> > -----Original Message-----
> > From: Discussion of SQR, Brio Technology's database
> reporting
> > language [mailto:SQR-USERS@list.iex.net] On Behalf Of Ashish Bhatt
> > Sent: Saturday, October 20, 2001 7:35 AM
> > To: SQR-USERS@list.iex.net
> > Subject: SQR Question: Getting Values of Dynamic Columns in
select
> >
> > Hi Peoplesoft and SQR Gurus,
> >
> > I hope you are doing fine today.
> >
> > I am facing tough time in getting the values of
> > Dynamic Columns in the select.
> >
> > I am having below SQR code:
> >
> > begin-select
> > $c1
> > do Write-Data
> > from [$table_name]
> > where AUDIT_STAMP < SYSDATE - 1300
> > end-select
> >
> >
> > In the above $c1 is all the column names of the table.
> >
> > I want the values returned by above select.
> >
> > Can you please give me some idea how this can be done
> > ?
> >
> > Thanks in advance.
> >
> > Have a nice day and great weekend.
> >
> > Regards.
> >
> > Ashish Bhatt.
> >
>
>
>