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

Re: Help in getting data into CSV file



Hi Ashish,

you need to create your $select in a little bit different way.
You could change it to:

EMPLOYER_APPROVED || ',' || to_char(PREV_SABB_ELIG_DT,'dd-mm-yyyy') || ','
|| AUDIT_OPRID
(so leave the 'select' out of there and make sure all the fields are
character or converted to character)

put the from in $from and the where clause in $where

from PS_AUDIT_ABS_HIST where AUDIT_STAMP < SYSDATE - 1300;

Then do
begin-select
[$select] &col=char
        print &col ()
[$from]
[$where]
end-select


Frank Kloprogge
Fontys ICT-Services
DBA PeopleSoft
08778-78710


-----Oorspronkelijk bericht-----
Van: Ashish Bhatt [mailto:ashish_bhatt@HOTMAIL.COM]
Verzonden: dinsdag 23 oktober 2001 1:55
Aan: SQR-USERS@LIST.IEX.NET
Onderwerp: Help in getting data into CSV file


Hi Peoplesoft and SQR Gurus,

I hope you are doing fine today.

I have in  $select_statement all my column names, table name and the
condition.

My $select_statement is as below. It returns multiple rows.

let $select_statement  = "select
EMPLOYER_APPROVED,PREV_SABB_ELIG_DT,AUDIT_OPRID from PS_AUDIT_ABS_HIST where
AUDIT_STAMP < SYSDATE - 1300;"

I want to run this in SQR and get data in CSV (Comma Separated) file.

In the above statement fields and tables are dynamically created - meaning
that no fix number of columns. The columns comes from ALL_TAB_COLUMNS.

Is it possible in SQR ? Please reply.

Thanks in advance.

Have a nice day and great weekend.

Regards.

Ashish Bhatt.