Tuesday, December 26, 2006

PeopleTools Reference: Meta-SQL %SelectByKey

generates a select statement based on the given record definition.

Remember that a record object (not a record definition) stores both the record structure (table name and field name) and the field values. Therefore, the system has everything it needs to write a select statement: select ... list of fields ... from ... table name ... where ... key field name ... = ... value for that field ... and so on.

Related: %SelectByKeyEffdt

does the same thing except it adds the effective dating criteria to limit it to the most recent rows.

Examples

Local Record &recJob;
&recJob = CreateRecord(RECORD.JOB);
&recJob.EMPLID.value = &emplid;
&recJob.EMPL_RCD.value = &empl_rcd;
&recJob.EFFDT.value = &effdt;
&recJob.EFFSEQ.value = &effseq;
SqlExec("%SelectByKey(:1)", &recJob, &recJob);
WinMessage("Job Code: " | &recJob.JOBCODE.value);


Local Record &recNames, &recOutput;
&recNames = CreateRecord(RECORD.NAMES);
&recOutput = CreateRecord(RECORD.NAMES);
&recNames.EMPLID.value = &emplid;
&recNames.NAME_TYPE.value = "PRI";
SqlExec("%SelectByKeyEffdt(:1)", &recNames, %Date, &recOutput);


This post has moved to Wordpress

1 comment:

Anonymous said...

[url=http://tinyurl.com/y9qxher][img]http://i069.radikal.ru/1001/35/75e72b218708.jpg[/img][/url]



Related keywords:
Tramadol pain management doctors
Tramadol urinalysis testing
cash delivery shipped Tramadol
Tramadol from mexico bring back
Tramadol substitutions
online Tramadol fedex overnight delivery
is Tramadol tested for in urinalysis
pet dosage for Tramadol
[url=http://www.zazzle.com/AlexanderBlack]Tramadol online pharmacy [/url]
[url=http://seobraincenter.ru]http://seobraincenter.ru[/url]
Tramadol 50 mg tablets
cod delivery no rx Tramadol
Tramadol with suboxone
talk Tramadol wikipedia the free encyclopedia
Tramadol and migraine
online prescription Tramadol
overnight Tramadol saturday