[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] Error message for a beginner
The problem is that you have more than one table named with the "A" alias
within your program. You need give each table a different alias, due to
the way that SQR handles variable scooping. (Basically, it doesn't handle
variable scooping at all.) Just make sure that each table in each Select
or SQL statement has a different alias.
Also, go ahead and #include the standard suggestion that you find some
books or references. If you are using PeopleSoft, there is some nice
documentation in your PeopleSoft folders.
Thanks!
Allen Thornton
April
<yh266515@yahoo. To: sqr
<sqr-users@sqrug.org>
com> cc:
Sent by: Subject: [sqr-users] Error
message for a beginner
sqr-users-admin@
sqrug.org
02/24/2003 12:00
PM
Please respond
to sqr-users
I'm learning SQR and was trying to mess around with the syxtax. These two
following procedures worked:
Begin-Procedure Test($BUSINESS_UNIT, $PO_ID, :#TOTAL)
begin-select
A.MERCHANDISE_AMT &A.MERCHANDISE_AMT
Let #TOTAL = #TOTAL + &A.MERCHANDISE_AMT
FROM SALES A
WHERE A.BUSINESS_UNIT = $BUSINESS_UNIT
AND A.PO_ID = $PO_ID
end-select
Begin-Procedure Sub-Totals
Do TEST(&A.BUSINESS_UNIT, &A.PO_ID, #TOTAL)
End-Procedure Sub-Totals
***********************************************
And the two below are my version and don't work, in fact, the message was
popped right after the first procedure. I would very much for all the help
I
can get. Thanks.
Begin-Procedure Test
Begin-Select
A.MERCHANDISE_AMT &A.MERCHANDISE_AMT
Let #TOTAL = TOTAL + &A.MERCHANDISE_AMT
FROM SALES A
WHERE A.BUSINESS_UNIT = $BUSINESS_UNIT
AND A.PO_ID = $PO_ID
End-Select
Begin-Procedure Test
Begin-Procedure Sub-Totals
Do TEST(&A.BUSINESS_UNIT, &A.PO_ID, #TOTAL)
End-Procedure Sub-Totals
**********************
Error on line 369:
(SQR 3719) Columns names and expressions must be unique or be given
unique
pseudonyms (&name).
A.MERCHANDISE_AMT &A.MERCHANDISE_AMT
Errors were found in the program file.
SQR for PeopleSoft: Program Aborting.
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
_______________________________________________
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