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:

[javascript]
var html = $(htmlString).find(‘div.target’).html();
[/javascript]

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:

[sql]
SELECT SYSTIMESTAMP AS TSTAMP FROM DUAL;
[/sql]

Formatted:

[sql]
SELECT TO_CHAR(SYSTIMESTAMP, ‘DD/MM/YYYY HH24:MI:SS.FF6′) AS TSTAMP FROM DUAL;
[/sql]

Populating a timestamp database field using a current timestamp:
[sql]
INSERT INTO TABLE_NAME(TSTAMP) VALUES ((SELECT SYSTIMESTAMP FROM DUAL));
[/sql]

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

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