Welcome Guest. Sign in or Signup
PeopleSoft Interview Questions And Answers
Interview » Technical » SQL » %DateIn vs %DateOut
Asked by: Interviewer
%DateIn vs %DateOut are meta-SQLs used in PeopleSoft. Compare between %DateIn and %DateOut.
Candidate on Nov 26, 2012
The code you write may end up running on a different platform than the one it was originally written for. As not all RDBMS have the same syntax for representing dates, these meta-SQLs are particularly helpful.
When a date literal or a date bind variable is used within the WHERE clause of SELECT or UPDATE statements, it can be specified within the %DateIn meta-SQL variable to get the platform-specific SQL syntax for the date. In a similar way, it can also be used to pass a date in the INSERT statement.
In short it converts the date literal / bind variable into the format which the DB uses.
INSERT INTO PS_SGK_REC (EMPLID, NAME, JOIN_DT, DEPTID)
VALUES (‘001’, ‘John’, %DateIn(:1), ‘EAS’);
%DateOut on the other hand converts a date column in the SELECT clause to the format that PeopleSoft uses.
SELECT EMPLID, NAME, %DateOut(JOIN_DT)
WHERE DEPTID = ‘EAS’;
+5 Votes 0 Votes 0 Votes
Existing User New User? Register Now
User ID *
User ID *
© 2010 - 2011 PSoftSearch.com All right reserved.