PL/SQL (Procedural Language/Structured Query Language) is Oracle Corporation's procedural language extension for SQL. Questions about PL/SQL should probably be tagged "oracle" as well.

learn more… | top users | synonyms

0
votes
2answers
66 views

Efficient way to remove duplicate records

Is there more efficient way remove duplicate records? strsql := 'delete from ' || TableName || ' a where rowid < ( select max(rowid) from ' || TableName || ' b where a.val=b.val )';
0
votes
0answers
66 views

Attempting to optimize (or rewrite) a PL/SQL query

I am currently trying to improve on a query that is being used to build a view. The query is in PL/SQL, in an Oracle database. There are 3 different types of reports (100,200, and 300) that are ...
3
votes
1answer
47 views

How can I make my XML schema robust?

I am attempting to develop an XML schema (XSD) to represent a set of unit tests for some code. (Specifically, I am testing Oracle PL/SQL stored procedures.) I would like to have something that ...
2
votes
3answers
139 views

How can I refactor this PL/SQL code?

This works, but nvl AND case seem redundant. Basically, if null then 'N' else 'Y. CHICKEN_HATCH_DATE is a DATE data type. select stricken_chicken_id, case ...
3
votes
2answers
418 views

Oracle PL/SQL decryption function breaking index?

I have a package called pkg_crypto. My select looks like this: SELECT "SEQ", pkg_crypto.decrypt("NAME", 'secret') name, pkg_crypto.decrypt("TEL", 'secret') tel FROM MYTABLE ORDER BY "SEQ" DESC ...
1
vote
2answers
1k views

SQL query for adding column value to compare with other column

I have two tables table_inventory List item inventory_rack_key(primarykey) node_key rack_id inventory_item_key in_coming_qty,locked_qty quantity table_item ...