Apps To Fusion

.......Our Journey from Apps To Fusion

 
  • Increase font size
  • Default font size
  • Decrease font size



Validate Email PL/SQL

E-mail
User Rating: / 1
PoorBest 
Oracle delivers an API in EBS that can validate Email Address Format.
However it does not capture the invalidity if Email String were to be say xxx@host
You may use the below pl/sql function for Email Address Validation.


CREATE OR REPLACE FUNCTION xx_check_email(l_user_name IN VARCHAR2)
  RETURN VARCHAR2 IS
  l_dot_pos    NUMBER;
  l_at_pos     NUMBER;
  l_str_length NUMBER;
BEGIN
  l_dot_pos    := instr(l_user_name
                       ,'.');
  l_at_pos     := instr(l_user_name
                       ,'@');
  l_str_length := length(l_user_name);
  IF ((l_dot_pos = 0) OR (l_at_pos = 0) OR (l_dot_pos = l_at_pos + 1) OR
     (l_at_pos = 1) OR (l_at_pos = l_str_length) OR
     (l_dot_pos = l_str_length))
  THEN
    RETURN 'FAILURE';
  END IF;
  IF instr(substr(l_user_name
                 ,l_at_pos)
          ,'.') = 0
  THEN
    RETURN 'FAILURE';
  END IF;
  RETURN 'SUCCESS';
END xx_check_email;


Comments (3)add
...
written by kalyan , August 21, 2007
Its really helping.
report abuse
vote down
vote up
Votes: +1
oracle
written by ramu , February 01, 2008
what is the meaning of hwm(high watermask) in oracle?
report abuse
vote down
vote up
Votes: +0
How to Relate GL_CODE_COMBINATION, GL_BALANCES and FLEX_FIELDS
written by Sundar CPM , June 25, 2008
Hi Anil,
Sorry for positing some irrelevant subject in this area. I am a novice in Oracle Apps. I have written the below query but the performance is not good. I am sure that I am missing some join conditions. Pls help me finding it out.
===================================================
SELECT GLB.set_of_books_id, GLB.code_combination_id, gcc1.segment1,
ft1.description, gcc1.segment2, ft2.description, gcc1.segment3,
ft3.description, gcc1.segment4, ft4.description, gcc1.segment5,
ft5.description, gcc1.segment6, ft6.description, gcc1.segment7,
ft7.description, GLB.currency_code, GLB.period_name, actual_flag,
budget_version_id, translated_flag, revaluation_status, period_type,
period_year, period_num, period_net_dr, period_net_cr,
period_to_date_adb, quarter_to_date_dr, quarter_to_date_cr,
quarter_to_date_adb, year_to_date_adb, project_to_date_dr,
project_to_date_cr, project_to_date_adb, begin_balance_dr,
begin_balance_cr, period_net_dr_beq, period_net_cr_beq,
begin_balance_dr_beq, begin_balance_cr_beq, GLB.template_id,
quarter_to_date_dr_beq, quarter_to_date_cr_beq, project_to_date_dr_beq,
project_to_date_cr_beq, begin_balance_dr + period_net_dr,
begin_balance_cr + period_net_cr,
begin_balance_dr_beq + period_net_dr_beq,
begin_balance_cr_beq + period_net_cr_beq
FROM gl.gl_balances GLB,
apps.gl_code_combinations gcc1,
apps.fnd_flex_values fv1,
apps.fnd_flex_values_tl ft1,
apps.fnd_flex_values fv2,
apps.fnd_flex_values_tl ft2,
apps.fnd_flex_values fv3,
apps.fnd_flex_values_tl ft3,
apps.fnd_flex_values fv4,
apps.fnd_flex_values_tl ft4,
apps.fnd_flex_values fv5,
apps.fnd_flex_values_tl ft5,
apps.fnd_flex_values fv6,
apps.fnd_flex_values_tl ft6,
apps.fnd_flex_values fv7,
apps.fnd_flex_values_tl ft7
WHERE GLB.code_combination_id = gcc1.code_combination_id
AND GLB.actual_flag = 'A'
AND gcc1.chart_of_accounts_id = 101
AND gcc1.segment1 = fv1.flex_value
AND fv1.flex_value_set_id = 1002722
AND fv1.flex_value_id = ft1.flex_value_id
AND ft1.LANGUAGE = 'US'
AND gcc1.segment2 = fv2.flex_value
AND fv2.flex_value_set_id = 1002723
AND fv2.flex_value_id = ft2.flex_value_id
AND ft2.LANGUAGE = 'US'
AND gcc1.segment3 = fv3.flex_value
AND fv3.flex_value_set_id = 1002724
AND fv3.flex_value_id = ft3.flex_value_id
AND ft3.LANGUAGE = 'US'
AND gcc1.segment4 = fv4.flex_value
AND fv4.flex_value_set_id = 1002725
AND fv4.flex_value_id = ft4.flex_value_id
AND ft4.LANGUAGE = 'US'
AND gcc1.segment5 = fv5.flex_value
AND fv5.flex_value_set_id = 1002726
AND fv5.flex_value_id = ft5.flex_value_id
AND ft5.LANGUAGE = 'US'

===================================================

Thanks,
Sundar
report abuse
vote down
vote up
Votes: -5
Write comment
quote
bold
italicize
underline
strike
url
image
quote
quote
smile
wink
laugh
grin
angry
sad
shocked
cool
tongue
kiss
cry
smaller | bigger

security image
Write the displayed characters


busy
Last Updated ( Tuesday, 09 January 2007 10:09 )  

Search apps2fusion