sqlexec peoplecode
How to use sqlexec peoplecode for select update insert or delete of each requirements by syntax of function in peoplesoft.
sqlexec ({sqlcmd | SQL.sqlname}, bindexprs, outputvars)
The sqlexec function can only select a single row of data. If your sql statement (or your sql.sqlname statement) retrieves more than one row of data, the function peoplecode send result only the first row to its output variables.
For example
sqlexec(“select name from ps_name where emplid =:1”,&Emplid,&Name_Emp);
/*———————————————————-*/
sqlexec(SQL.SELECT_NAME,&Emplid,&Name_Emp);
/*———————————————————-*/
&sqltext = “select name from ps_name “;
&sqltext = &sqltext | ” where emplid =:1″;
SQLExec(&sqltext, &Emplid,&Name_Emp);