Converts a date into the form the database uses.
- Where clauses
Remember DateIn passes a date into the database.
Converts a date into the form that PeopleTools uses.
- Select clause
WHERE EMPLID = :1
AND EMPL_RCD = :2
INSERT INTO PS_MY_RNCTL(OPRID, RUN_CONTROL_ID, AS_OF_DATE)
VALUES(:1, :2, %DateIn(:3))
SET MY_DATE = %DateIn(:1)
2 thoughts on “PeopleTools Reference: Meta-SQL DateIn/DateOut”
I have a SQL preprocessor that evaluates the SQL right before it passes it to the database. Currently, the only thing it does is to pull the semi-colon off of the end. But, I plan to have it resolve meta-sql such as %Table() and %CurrentDateIn, etc.
That’s pretty cool. Where is the SQL preprocessor at? Is it in an app or some sort of trigger in the database?
I kind of did the same thing with a Java app I’ve been toying with using instead of SQL Developer. It looks for %tokens and evaluates them before running the SQL in the database. I think, right now, I only have %CurrentDateIn working.