[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



I am getting the below error.

I am

fmsql718 : ps7v : /home/abhattX >run.sh
SQR V4.3.4
Copyright (C) SQRIBE Technologies, 1994-99.  All Worldwide Rights Reserved.

c1 EMPLOYER_APPROVED,to_char(PREV_SABB_ELIG_DT,'dd-mm-yyyy'),AUDIT_OPRID
table name PS_AUDIT_ABS_HIST
where clause AUDIT_STAMP < SYSDATE - 1300
(SQR 1303) Error in SQL (perhaps missing &name after expression):
select [$c1]  from [$table_name] where [$whereclause]
(SQR 1304) Check SELECT columns, expressions and 'where' clause for syntax.

SQR: Program Aborting.


>From: "Kloprogge,F.J.M. (Frank)" <F.J.M.Kloprogge@FONTYS.NL>
>Reply-To: sqr-users@list.iex.net
>To: SQR-USERS@list.iex.net
>Subject: Re: Help in getting data into CSV file
>Date: Tue, 23 Oct 2001 10:03:28 +0200
>
>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.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp