How To Select a Child Element Using jQuery

Let’s assume you have an HTML string containing a parent element with a number of children and their sub children elements. If you’d like to extract HTML of one of the children (by class name or id), you can use this jQuery line:

var html = $(htmlString).find('div.target').html();

It can be useful when you get an AJAX response from the server, and only a particular section needs to extracted.

How To Populate a Timestamp Field With Current Timestamp

Raw:

SELECT SYSTIMESTAMP AS TSTAMP FROM DUAL;

Formatted:

SELECT TO_CHAR(SYSTIMESTAMP, 'DD/MM/YYYY HH24:MI:SS.FF6') AS TSTAMP FROM DUAL;

Populating a timestamp database field using a current timestamp:

INSERT INTO TABLE_NAME(TSTAMP) VALUES ((SELECT SYSTIMESTAMP FROM DUAL));

Or another way is simply to use TO_TIMESTAMP() if the timestamp time is known:

INSERT INTO TABLE_NAME(TSTAMP) VALUES (
   TO_TIMESTAMP('3/08/2010 4:38:52.000000 PM','fmDDfm/MM/YYYY fmHH12fm:MI:SS.FF AM')
);