satishgaudo.com

Understanding technology

Archive for June 14th, 2009

Send mail :Through sql / pl in oracle

create or replace PROCEDURE send_mail (p_sender IN VARCHAR2, p_recipient IN VARCHAR2, p_message IN VARCHAR2) as l_mailhost VARCHAR2(255) := ‘192.168.1.21′; l_mail_conn utl_smtp.connection; BEGIN l_mail_conn := utl_smtp.open_connection(l_mailhost, 25); utl_smtp.helo(l_mail_conn, l_mailhost); utl_smtp.mail(l_mail_conn, p_sender); utl_smtp.rcpt(l_mail_conn, p_recipient); utl_smtp.open_data(l_mail_conn ); utl_smtp.write_data(l_mail_conn, p_message); utl_smtp.close_data(l_mail_conn ); utl_smtp.quit(l_mail_conn); end; /

Now execute the procedure above:

begin send_mail( ’satishg@imageonline.co.in’, ‘rolvy@imageonline.co.in’, ‘Hello Tom’ ); end; /

14 June 2009 at 00:42 - Comments
jacky green at 19:20 on 18 August 2009
I really liked your blog! keep it up

Bit of oracle

All the system tables that stores the user defined tables/sequences/object types :   user_types   USER_TYPE_ATTRS   user_sequences   user_tables   USER_TAB_COLUMNS   Code for creating a table for already existing table:   CREATE TABLE HIP_TASK_INFO_satish as SELECT HIP_TASK_ID ,   HIP_TASK_ID as HIP_TASK_BUDGET_ID, HIP_TASK_ID as HIP_DUTY_DETAIL_ID, IS_ACTIVE, IS_DELETE, ADDDT FROM HIP_TASK_INFO   Command to rename table :   RENAME HIP_TASK_INFO_satish TO HIP_TASK_INFO ;   Code example for limits implementaion:   SELECT temp.*,rownum FROM (   SELECT sp.company_name, sp.contact_phone, sp.office_fax, sp.sub_id, sb.branch_id, sb.branch_url, sp.Office_Address.Address1 || ‘, [...]

14 June 2009 at 00:40 - Comments

function to check for valid date

function validDate(sDatePassed) { //if the date is in dd/mm/yyyy format then valid date returns 1else 0 if (sDatePassed.length > 0) { aDate = sDatePassed.split("/"); if (aDate.length != 3) return(0); if (aDate[1].length == 1) aDate[1]= "0"+aDate[1]; var iLeapyear = 0; // check whether the year is leap year – aleap year is div by 4 ,100, 400 if ((aDate[2] % 4) == [...]

14 June 2009 at 00:30 - Comments
livelybrowsers at 22:54 on 19 October 2010
Thanks for good stuff
aparadekto at 03:11 on 27 October 2010
Hey, I can't view your site properly within Opera, I actually hope you look into fixing this.

Google Wave

Google Wave is a new tool for communication and collaboration on the web, coming later this year. The service seems to combine Gmail and Google Docs into an interesting free-form workspace that could be used to write documents collaboratively, plan events, play games or discuss a recent news.

“In Google Wave you create a wave and add [...]

14 June 2009 at 00:22 - Comments