Posts

Showing posts from July, 2012

Ora | HTML eMail Util

HTML eMail Utility This Package/function is useful for sending emails from your pl/sql Code. It send out emails with simple HMTL tags, which can used for neatly formatting your emails.  Download the Source Code Package_spec - PKG_HTML_eMAIL_spec.sql Package_body -PKG_HTML_eMAIL_body.sql Installation Steps Download the package spec and the body from the above links. Run the downloaded script and ensure you have a valid PKG_HTML_eMAIL package. Usage Notes **************************** * Example-1 : Simple Email **************************** DECLARE a NUMBER; BEGIN a := PKG_HTML_eMAIL.sendSimpleEmail('test@domain.com', 'testing', ' Testing HTML body R1 - C1 R1 - C2 R1 - C3 R2 - C1 R2 - C2 R2 - C3 '); IF

Ora | getNext

Get_Next This function is useful for extracting the values from a comma separated values. Parameters   pv_in_string      is the delmited string      pn_in_pos     position of the value that is required      pv_in_delimiter      single delimiter char      pv_in_endofstr      If this string is set to 'Y' then it will return a string like $$END$$ when the    requested position(pn_in_no) is greater than the maximum position available    within that string. i.e if the position is beyond the end of the string. This might    be useful to decide when to EXIT when the we are writing a LOOP logic on a    comma delimted string. Normally we exit when we get a NULL value for a    position.  Function create or replace CREATE OR REPLACE FUNCTION VSUBR.getNext( pv_in_string IN VARCHAR2, pn_in_pos IN NUMBER, pv_in_delimiter IN VARCHAR2 DEFAULT ',', pv_in_endofstr IN VARCHAR2 DEFAU