Recent Notes

Displaying keyword search results 1 - 4
Created by James on February 02, 2012 09:20:22    Last update: February 02, 2012 09:20:22
This example came from the jQuery validation documentation. The required rule can be used to validate a required selection box when you set the value of the first option to empty. <!DOCTYPE HTML> <html> <head> <scrip... The error message is the title since no error message is specified. A more fully defined validation check would look like this: $('#my-form').validate({ errorElement: "p", ...
Created by Dr. Xi on October 09, 2009 19:27:22    Last update: October 09, 2009 19:30:01
PL/SQL code from Pandazen : CREATE OR REPLACE FUNCTION GET_INSERT_SCRIPT(V_TAB... Usage: To create the script for generating the INSERT statements: set head off set pages 0 set trims on set... Run the resulting script to generate the INSERT script: set pages 0 set trims on set lines 2000 ... PL/SQL code from Oracle Ask Tom set serveroutput on size 100000 set feedbac...
Created by Dr. Xi on September 13, 2008 20:52:47    Last update: September 15, 2008 23:04:35
The text source of the stored objects (including stored procedures) are made available in Oracle by three views: USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the OWNER column. ALL_SOURCE describes the text source of the stored objects accessible to the current user. DBA_SOURCE describes the text source of all stored objects in the database. These are the columns: Column Name Description OWNER Owner of the object NAME Name of the object TYPE Type of object: FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY LINE Line number of this line of source TEXT Text source of the stored object If you want to search for a certain keyword in the source,...
Created by Dr. Xi on August 11, 2007 23:19:26    Last update: August 12, 2007 01:39:33
For SQL Server 2000 and above, there are three functions: SELECT @@IDENTITY When a record is inserted into a table with a identity column, the function @@IDENTITY returns the last identity value that was inserted in the database on the same open connection. If a trigger adds a record into another table, which happens to have an identity column, @@IDENTITY will now return this value instead. SELECT IDENT_CURRENT('tablename') This will give you the most recent identity value for the given table regardless of who inserted it. SELECT SCOPE_IDENTITY() SCOPE_IDENTITY shows the most recently inserted IDENTITY in the current scope (which ignores any triggers that might fire). For SQL Server version prior to 2000, it is customary to use a stored procedure: CREATE PROCEDURE myProc @param1 INT AS......