Oracle Sql Queries
How to find first day and Last day of previous month
Last_Day(ADD_MONTHS('YOUR DATE',-1)); - Last day
Last_Day(ADD_MONTHS('YOUR DATE',-2))+1; - First day
How to retrieve only name from email id and truncating the data?
email_address,'@')-1 ) from fnd_user
Generating XML from oracle data
Essentially, use @ before the column you want as attribute.
qryCtx := dbms_xmlgen.newContext('SELECT empno "@empno", ename, job from scott.emp where rownum <5');
Passing parameters to a select statement column list