Archive for the ‘Query’ category

Selecting the translate values from PSXLATITEM table by joining to another table

January 14th, 2010

Our current Version: PS8.9; People Tools: 8.47How can we select the translate values from PSXLATITEM table by joining to another table?I want the description(XLATLONGNAME) in the field value rather th
How can I get the translate values description selected in the query?
Record used :
PSXLATITEM.
HRS_JO_RQMT_I
fiels selected:
SCHEDULED_TYPE
SHIFT
Translate values of Schduled_type:
P
F
O
Long names:
par time
Full time
Optional
I want the descriptions (long names) of the tanslate values should be displayed in the output rather than
F, P, O
Any suggestions ?/ Thanks.

If you are doing this via the online Query tool, you can change the Field settings (on the Field tab) to display the Long description rather than the ID for the fields you are selecting.

If you are just writing SQL, I would suggest using XLATTABLE_VW instead of PSXLATITEM to obtain the long description of the field(s) you are selecting. In my queries, I typically join to that view with the following criteria:

SELECT D.XLATLONGNAME AS SCHEDULE_TYPE
FROM PS_HRS_JO_RQMT_I A, XLATTABLE_VW B
WHERE B.FIELDNAME = 'SCHEDULED_TYPE'
AND A.SCHEDULED_TYPE = B.FIELDVALUE AND B.EFFDT
(SELECT MAX(B_ED.EFFDT) FROM XLATTABLE_VW B_ED
WHERE B.FIELDNAME = B_ED.FIELDNAME
AND B.FIELDVALUE = B_ED.FIELDVALUE
AND B_ED.EFFDT <= SYSDATE);
Share and Enjoy:
  • PDF
  • Print
  • email
  • Twitter
  • Facebook
  • LinkedIn
  • RSS
  • Tumblr
  • Google Bookmarks
  • Netvibes