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

RE: [sqr-users] Problem: &pseudonym =type must be 'char', 'number', or 'date'.



i'm pretty sure you have to indent all the non-sql parts of it.  Your
select, from, where have to hug the left side, and all SQR parts (let, if,
etc.) need to be indented.  I'm not sure exactly where you're getting
&column1 from...if you mean for it to be ' = A.statuz' then you dont have to
do anything.  The following code SHOULD work, except for that &column1
part...


BEGIN-SELECT ON-ERROR=SQLError
A.statuz
     let $status = &A.statuz
     if $status = ' '
         let $status = 'none'
        else
           let $status = &column1
        end-if
           date-time () HH:MI &time_begin
           let $msg = '--> Status WH_AGENT: ' ||&time_begin || '/' ||
$status
           display $msg
           print $msg (+1,10)

FROM
auto_proc_stat_tbl A
WHERE
A.job_id = #JOBID
END-SELECT







-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of
Wjatscheslaw KRAVTCHENKO
Sent: Friday, November 26, 2004 11:21 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Problem: &pseudonym =type must be 'char', 'number',
or 'date'.


SQR Gurus!

I'm stuck wit some quite simple SQR since yesterday and not going any
further:

let $col2 = 'A.job_id'
BEGIN-SELECT ON-ERROR=SQLError
A.statuz
let $status = &A.statuz
if $status = ' '
   let $status = 'none'
   date-time () HH:MI &time_begin
   let $msg = '--> Status WH_AGENT: ' ||&time_begin || '/' || $status
   display $msg
   print $msg (+1,10)
else
   let $status = &column1
   date-time () HH:MI &time_begin
   let $msg = '--> Status WH_AGENT: ' ||&time_begin || '/' || $status
   display $msg
   print $msg (+1,10)
end-if
FROM
auto_proc_stat_tbl A
WHERE
[$col2] = #JOBID
END-SELECT

No matter how I try I'm getting the following Error-Msg:

log-file:
Error on line 129:
   (SQR 3719) Columns names and expressions must be unique or be given
unique pseudonyms (&name).
let $statusz = &A.statuz

debugger:
 &pseudonym =type must be 'char', 'number', or 'date'.
 if $status = ''

Any advise, please?

__________________________________________
Wjatscheslaw Kravtchenko (Mr.)
ProFi System Manager Assistant
ProFi Technical Team
Information Technology Service
Division for Management
United Nations Office on Drugs and Crime

Tel:        (+43-1) 26060-4153
Websites:   www.unov.org, www.unodc.org
__________________________________________
Impossible is not a fact, only an opinion


_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users

_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users