Skip to content

Instantly share code, notes, and snippets.

--http://www.oracle.com/technetwork/issue-archive/2013/13-mar/o23plsql-1906474.html
DECLARE
l_total INTEGER := 10000;
CURSOR employee_cur
IS
SELECT employee_id
FROM plch_employees
ORDER BY salary ASC;
employee_rec employee_cur%ROWTYPE;
CREATE OR REPLACE PACKAGE PKGCOM_SECURITY IS
-- Author :
-- Created : 2/13/2013 11:45:32 AM
-- Purpose :
-- Public function and procedure declarations
PROCEDURE INSERT_USER_SECURITY(p_ssid IN table_name.ssid%TYPE,
p_return OUT VARCHAR2);
SELECT * FROM table_a WHERE tax_year = 2011 AND
(
(id, no, rp, code) IN
(('0004','001',1, 'ADBB'), ('0084', '001', 1, 'ADAN'),('0074', '900', 1, 'TPAR'))
OR bsla_code IN ('C000','CB0')
)
SELECT CURSOR (SELECT * FROM t1 WHERE TYEAR = 2010) AS SHEET1,
CURSOR (SELECT * FROM t2 WHERE TYEAR = 2010) AS SHEET2,
CURSOR (SELECT * FROM t3 WHERE TYEAR = 2010) AS SHEET3
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="http://code.jquery.com/ui/1.10.0/jquery-ui.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.0/themes/base/jquery-ui.css" />
<script>
$(document).ready(function() {//$(function(){
$('input[type=checkbox]').click(function() {
var ischeck = this.checked
path = $(this).attr('path')
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(function() {
$("#mybutton").click(function() {
alert($("#myform").serialize());
});
$("#myname").change(function(){
if(this.value.length<5)$("#namerror").html("Name should be at least 5 chars")
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(function() {
$("a").click(function(e) {
alert("Hello World!");
e.preventDefault();
});
});
/**
* http://www.mkyong.com/java/java-object-sorting-example-comparable-and-comparator/
*/
//1. Sort an Array
String[] fruits = new String[] {"Pineapple","Apple", "Orange", "Banana"};
Arrays.sort(fruits);
int i=0;
for(String temp: fruits){
System.out.println("fruits " + ++i + " : " + temp);
//Note: You dont need a quote
var str = "<tr><td></td><td></td><td></td><td></td></tr>";
$("[id$=line1Props] tr:last").after(str);
--Source Article/Blog
--http://decipherinfosys.wordpress.com/2009/06/22/mutating-tabletrigger-error-and-how-to-resolve-it/
Mutating table/trigger error and how to resolve it
Posted by decipherinfosys on June 22, 2009
Most of us who have worked in Oracle have encountered ORA-04091 (table xxx is mutating. Trigger/function might not see it) at some time or the other during the development process. In this blog post, we will cover why this error occurs and how we can resolve it using different methodology.
Mutating error normally occurs when we are performing some DML operations and we are trying to select the affected record from the same trigger. So basically we are trying to select records in the trigger from the table that owns the trigger. This creates inconsistency and Oracle throws a mutating error. Let us take a simple scenario in which we have to know total number of invalid objects after any object status is updated to ‘INVALID’. We will see it with an example. First let us create a table and then
function getSearchResultsSP(tax_year, search_str, user_id, sys_id, sys_privs) {
sp = new storedproc();
sp.setDatasource(Application.DSN_GDX);
sp.setProcedure("PKG_GAIN_LOSS.GET_SEARCH_RESULTS");
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_INTEGER", VALUE=tax_year, DBVARNAME="P_TAX_YEAR");
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=search_str, DBVARNAME="p_search_str");
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=user_id, DBVARNAME="p_userId");
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=sys_id, DBVARNAME="p_sysId");
sp.addParam(TYPE = "IN", CFSQLTYPE="CF_SQL_VARCHAR", VALUE=sys_privs, DBVARNAME="p_sysPrivs");