[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Re: prompt user for date
Both of your selects are returning an implicit &EMPLID variable.
You need to explicitly reference a new dynamic variable name for one of the
EMPLID fields being returned.
For example, in your second Select against PERSONAL_DATA, it should look as
follows:
BEGIN-PROCEDURE GET_PERSONAL_DATA
BEGIN-SELECT
EMPLID &SECOND_EMPLID
SSN
FNAME
Now you can reference the value for this EMPLID using the &SECOND_EMPLID
variable.
Hope this helps!
Tracy E. Barnes
Ciber Enterprise Solutions
Principal Consultant
USA Cell: +1 (317) 374-7356
UK Mobile: +44 (0) 7952 968 447
-----Original Message-----
From: Lisa Kelsey [mailto:lkelsey@alamo-group.com]
Sent: Wednesday, 06 August, 2003 8:52 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Re: prompt user for date
Thanks for the responses, everyone, the error is gone! I have one error
left
in the file, still need help. In the procedure get personal data, I get
the
following error: Error on line 33: (SQR 3719) Columns names and
expressions
must be unique or be given unique pseudonyms (&name).
EMPLID Errors were found in the program file.
SQR: Program Aborting. The error is referring to the line with emplid
under
the procedure get personal data.
Here's the code:
BEGIN-PROCEDURE MAIN
!PROMPT USER TO ENTER BEGIN AND END DATE
INPUT $BEGIN_DT 'ENTER BEGIN DATE' TYPE MM-DD-YYYY
INPUT $END_DT 'ENTER END DATE' TYPE MM-DD-YYYY
BEGIN-SELECT
EMPLID
LET $EMPLOYMENT.EMPLID=&EMPLID
HIRE_DT
FROM PS_EMPLOYMENT WHERE HIRE_DT >=$BEGIN_DT AND &HIRE_DT <=$END_DT
END-SELECT
END-PROCEDURE MAIN
BEGIN-PROCEDURE GET_PERSONAL_DATA
BEGIN-SELECT
EMPLID
SSN
FNAME
LNAME
STREET1
STREET2
CITY
STATE
ZIP
FROM PS_PERSONAL_DATA WHERE EMPLID=$EMPLOYMENT.EMPLID
END-SELECT
END-PROCEDURE GET_PERSONAL_DATA
Thanks,
Lisa
_______________________________________________
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