on 10-19-2005 6:46 PM
There are multiple versions of SELECT for HR e.g.
SELECT * FROM PA0001
WHERE PLANS = LEADING_POSITION-OBJID
AND BEGDA LE PN/BEGDA
AND ENDDA GE PN/ENDDA.
what difference between these 5 versions of SELECT?
*1. ?
and begda le pn/begda (begda)
and endda ge pn/endda. (endda)
*2. ?
and begda le pn/begda (begda)
and endda ge pn/begda. (begda)
*3. ?
and begda le pn/endda (endda)
and endda ge pn/begda. (begda)
*4. ?
and begda le pn/endda (endda)
and endda ge pn/endda. (endda)
*5. the newest record
AND ENDDA = '99991231'.
Take the following records
start date end date
Record A 21/10/2003 28/20/2003
Record B 29/10/2003 01/10/2005
Record C 22/10/1999 31/12/9999
Assuming selection criteris is 20/01/2003 to 02/10/2005
WIth the above data lets analyse your questions .
1. This select will select records which have begin date less than section screen begin date and end date greater than selection screen end date. So in our case record C will be selected
2. In this case C will be selected
3. In this case all the 2 records will be selected . This is the case which will be mostly used unless there are specific reqirements. This wil fetch all records whihc have either thier begin or end date in the given range.
4. Only C will be picked up.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
6 | |
6 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.