This SQL will search for filenames that contain characters other than
- a-z
- A-Z
- 0-9
- underscore
- parenthesis
- dash
- period
- square brackets
This SQL will search for filenames that contain characters other than
I've been running into situations where our application engines are not clearing the temp tables even after process instance has been deleted.
Also, multiple occurrences of the process halting for no reason.
Oracle's workaround is to clear the temp tables and restart the process.
But which temp tables do you clear?
Try this script.
I want to remove worklist entries which have dead links.
But they only gave me a screenshot of the worklist page.
I want to export all my query results from Oracle SQL Developer
I have two (2) options.
Oracle SQL Developer
Version 2.1.1.64
Build MAIN-64.65
SELECT /*csv*/ * FROM PS_JOB
Or just click on query results and click Ctrl + End.
I encountered this error when I used a subselect in my PSQuery expression.
FROM clauses are not allowed in expressions (50,536)
SQL error. Stmt #: 5682 Error Position: 107 Return: 936 - ORA-00936: missing expression
A SQL error occurred. Please consult your system log for details.
Error in running query because of SQL Error, Code=936, Message=ORA-00936: missing expression (50,380)
Here's the workaround:
For some reason, the demo environment is not up to date with all the patches and bundles applied to production.
I need to do a full compare of all the PeopleCode in the system and I need to identify which ones are actual customizations vs patches.
%EffdtCheck %InsertSelect %InsertValues %Join %KeyEqual %SQL %SelectAll %SelectDistinct %SelectByKey %SelectByKeyEffDt
Now for some examples...
I want a list of PS_JOB's child record.
SELECT RECNAME FROM PSRECDEFN CONNECT BY PRIOR RECNAME = PARENTRECNAME START WITH PARENTRECNAME = 'Record Name Here';
Happy Holidays!
SELECT extract(YEAR from SYSDATE) as Year, extract(MONTH from SYSDATE) as Month, extract(DAY from SYSDATE) as Day FROM DUAL;
I want to grant SELECT, UPDATE, DELETE, or all of these to a record.
Fire up Data Mover:
SET LOG C:\TEMP\GRANTLOG2014.LOG; GRANT ALL ON SYSADM.PS_MYRECORDNAME TO myusername;
I want to list all phone numbers for a specific employee in one row.
Let's look at my progress with the OVER PARTITION command.
SELECT A.EMPLID, B.PHONE, ROW_NUMBER() OVER (ORDER BY A.EMPLID) as SEQ FROM PS_PERSON A, PS_PERSONAL_PHONE B WHERE B.EMPLID = A.EMPLID;
Results:
Now we add PARTITION BY EMPLID
This is for SQL.
SELECT TO_CHAR(AUDIT_STAMP, 'yyyy-mm-dd hh24:mi:ss') FROM PSAUDIT;
And this is using PeopleCode.
DateTimeToLocalizedString(%Date, "yyyyMMdd");
I want to find the navigation path using only a Component name.
Simple SQL
SELECT LEVEL0.PORTAL_LABEL || ' > ' || LEVEL1.PORTAL_LABEL || ' > ' || LEVEL2.PORTAL_LABEL || ' > ' || level3.PORTAL_LABEL PATH_TO_COMPONENT FROM PSPRSMDEFN level3 , PSPRSMDEFN level2 , PSPRSMDEFN level1 , PSPRSMDEFN LEVEL0 WHERE level3.PORTAL_URI_SEG2 = "Your Component Name" AND level3.PORTAL_PRNTOBJNAME = level2.PORTAL_OBJNAME AND level2.PORTAL_PRNTOBJNAME = level1.PORTAL_OBJNAME AND level1.PORTAL_PRNTOBJNAME = LEVEL0.PORTAL_OBJNAME AND level3.PORTAL_NAME = level2.PORTAL_NAME AND level2.PORTAL_NAME = level1.PORTAL_NAME AND level1.PORTAL_NAME = LEVEL0.PORTAL_NAME;
The next one is actually better.
No need to add SYSADM in front of every PS record.
ALTER SESSION SET CURRENT_SCHEMA = SYSADM;
Last used on Oracle SQL Developer Version 2.1.1.64.
SQL for max effective dated row from JOB table.
SELECT *
FROM PS_JOB J
WHERE J.EFFDT = (SELECT MAX (J_ED.EFFDT)
FROM PS_JOB J_ED
WHERE J_ED.EMPLID = J.EMPLID
AND J_ED.EMPL_RCD = J.EMPL_RCD
AND J_ED.EFFDT <= SYSDATE)
AND J.EFFSEQ = (SELECT MAX (J_ES.EFFSEQ)
FROM PS_JOB J_ES
WHERE J_ES.EMPLID = J.EMPLID
AND J_ES.EMPL_RCD = J.EMPL_RCD
AND J_ES.EFFDT = J.EFFDT)
ORDER BY J.EMPLID, J.EMPL_RCD, J.EFFDT, J.EFFSEQ;
If that returns multiple rows for a specific employee, that means he/she has additional assignments.
Use this SQL instead.