The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT precision
FROM fnd_currencies
WHERE currency_code = p_currency_code;
select substr(userenv('LANGUAGE'),1,instr(userenv('LANGUAGE'),'_')-1)
into session_language
from dual;
select initcap(lower(
l_word_amount||' '||
decode(trunc(p_amount),
1,p_unit_singular,
p_unit_plural)
))
into l_currency_word
from dual;
select initcap(lower(
l_word_amount||' '||
decode(trunc(p_amount),
1,p_unit_singular,
p_unit_plural)||' '||displayed_field||' '||l_part_amount_word
||' '||
decode(trunc((p_amount-trunc(p_amount))*p_unit_ratio),
-1,null,
p_sub_unit_plural)
))
into l_currency_word
from ap_lookup_codes
where lookup_code = 'AND'
and lookup_type = 'NLS TRANSLATION';
select initcap(lower(
l_word_amount||' '||
decode(trunc(p_amount),
1,p_unit_singular,
p_unit_plural)||' '||displayed_field||' '||l_part_amount_word
||' '||
decode(trunc((p_amount-trunc(p_amount))*p_unit_ratio),
1,p_sub_unit_singular,
p_sub_unit_plural)
))
into l_currency_word
from ap_lookup_codes
where lookup_code = 'AND'
and lookup_type = 'NLS TRANSLATION';
select description
into g_numlookup(p_num)
from ap_lookup_codes
where lookup_code = to_char(p_num)
and lookup_type = 'NUMBERS';
select substr(userenv('LANGUAGE'),1,instr(userenv('LANGUAGE'),'_')-1)
into session_language
from dual;
select ' '||lc1.displayed_field||' ',
' '||lc7.displayed_field||' ',
' '||lc2.displayed_field||' ',
' '||lc6.displayed_field||' ',
' '||lc3.displayed_field||' ',
lc4.displayed_field,
lc5.displayed_field
into c_billion,
c_billions,
c_million,
c_millions,
c_thousand,
c_zero,
c_and
from ap_lookup_codes lc1,
ap_lookup_codes lc2,
ap_lookup_codes lc3,
ap_lookup_codes lc4,
ap_lookup_codes lc5,
ap_lookup_codes lc6,
ap_lookup_codes lc7
where lc1.lookup_code = 'BILLION'
and lc1.lookup_type = 'NLS TRANSLATION'
and lc2.lookup_code = 'MILLION'
and lc2.lookup_type = 'NLS TRANSLATION'
and lc3.lookup_code = 'THOUSAND'
and lc3.lookup_type = 'NLS TRANSLATION'
and lc4.lookup_code = 'ZERO'
and lc4.lookup_type = 'NLS TRANSLATION'
and lc5.lookup_code = 'AND'
and lc5.lookup_type = 'NLS TRANSLATION'
and lc6.lookup_code = 'MILLIONS'
and lc6.lookup_type = 'NLS TRANSLATION'
and lc7.lookup_code = 'BILLIONS'
and lc7.lookup_type = 'NLS TRANSLATION';
g_numlookup.DELETE;
SELECT
decode(.00000000001*(mod(abs(Chk_Amt),1000000000000)-mod(abs(Chk_Amt),100000000000)),
1,decode(mod(trunc(Chk_Amt/1000000000),1000)-100, 0,'Cien ','Ciento '),
2,'Doscientos ',
3,'Trescientos ',
4,'Cuatrocientos ',
5,'Quinientos ',
6,'Seiscientos ',
7,'Setecientos ',
8,'Ochocientos ',
9,'Novecientos ',
0,null,
'ERROR ') ||
decode(.0000000001*(mod(abs(Chk_Amt),100000000000)-mod(abs(Chk_Amt),10000000000)),
1,(decode(.000000001*(mod(abs(Chk_Amt),10000000000)-mod(abs(Chk_Amt),1000000000)),
0,'Diez ',
1,'Once ',
2,'Doce ',
3,'Trece ',
4,'Catorce ',
5,'Quince ',
6,'Dieciseis ',
7,'Diecisiete ',
8,'Dieciocho ',
9,'Diecinueve ',
'ERROR ')),
2,(decode(.000000001*(mod(abs(Chk_Amt),10000000000)-mod(abs(Chk_Amt),1000000000)),
0,'Veinte ',
1,'Veintiun ',
2,'Veintidos ',
3,'Veintitres ',
4,'Veinticuatro ',
5,'Veinticinco ',
6,'Veintiseis ',
7,'Veintisiete ',
8,'Veintiocho ',
9,'Veintinueve ',
'ERROR')),
3,'Treinta ',
4,'Cuarenta ',
5,'Cincuenta ',
6,'Sesenta ',
7,'Setenta ',
8,'Ochenta ',
9,'Noventa ',
NULL) ||
decode(.000000001*(mod(abs(Chk_Amt),10000000000)-mod(abs(Chk_Amt),1000000000)),
0,NULL,
(decode(.0000000001*(mod(abs(Chk_Amt),100000000000)-mod(abs(Chk_Amt),10000000000)),
0,NULL,
1,NULL,
2,NULL,
'y '))) ||
decode(.0000000001*(mod(abs(Chk_Amt),100000000000)-mod(abs(Chk_Amt),10000000000)),
1,NULL,
2,NULL,
(decode(.000000001*(mod(abs(Chk_Amt),10000000000)-mod(abs(Chk_Amt),1000000000)),
1,'Un ',
2,'Dos ',
3,'Tres ',
4,'Cuatro ',
5,'Cinco ',
6,'Seis ',
7,'Siete ',
8,'Ocho ',
9,'Nueve ',
0,NULL,
'ERROR '))) ||
decode(SIGN(abs(Chk_Amt)-999.99),
1,decode(.00000000001*(mod(abs(Chk_Amt),1000000000000)-mod(abs(Chk_Amt),100000000000)),
0,decode(.0000000001*(mod(abs(Chk_Amt),100000000000)-mod(abs(Chk_Amt),10000000000)),
0,decode(.000000001*(mod(abs(Chk_Amt),10000000000)-mod(abs(Chk_Amt),1000000000)),
0,NULL,
'Mil '),
'Mil '),
'Mil '),
NULL) ||
decode(.00000001*(mod(abs(Chk_Amt),1000000000)-mod(abs(Chk_Amt),100000000)),
1,decode(mod(trunc(Chk_Amt/1000000),1000)-100, 0,'Cien ','Ciento '),
2,'Doscientos ',
3,'Trescientos ',
4,'Cuatrocientos ',
5,'Quinientos ',
6,'Seiscientos ',
7,'Setecientos ',
8,'Ochocientos ',
9,'Novecientos ',
0,null,
'ERROR ') ||
decode(.0000001*(mod(abs(Chk_Amt),100000000)-mod(abs(Chk_Amt),10000000)),
1,(decode(.000001*(mod(abs(Chk_Amt),10000000)-mod(abs(Chk_Amt),1000000)),
0,'Diez ',
1,'Once ',
2,'Doce ',
3,'Trece ',
4,'Catorce ',
5,'Quince ',
6,'Dieciseis ',
7,'Diecisiete ',
8,'Dieciocho ',
9,'Diecinueve ',
'ERROR ')),
2,(decode(.000001*(mod(abs(Chk_Amt),10000000)-mod(abs(Chk_Amt),1000000)),
0,'Veinte ',
1,'Veintiun ',
2,'Veintidos ',
3,'Veintitres ',
4,'Veinticuatro ',
5,'Veinticinco ',
6,'Veintiseis ',
7,'Veintisiete ',
8,'Veintiocho ',
9,'Veintinueve ',
'ERROR ')),
3,'Treinta ',
4,'Cuarenta ',
5,'Cincuenta ',
6,'Sesenta ',
7,'Setenta ',
8,'Ochenta ',
9,'Noventa ',
NULL) ||
decode(.000001*(mod(abs(Chk_Amt),10000000)-mod(abs(Chk_Amt),1000000)),
0,NULL,
(decode(.0000001*(mod(abs(Chk_Amt),100000000)-mod(abs(Chk_Amt),10000000)),
0,NULL,
1,NULL,
2,NULL,
'y '))) ||
decode(.0000001*(mod(abs(Chk_Amt),100000000)-mod(abs(Chk_Amt),10000000)),
1,NULL,
2,NULL,
(decode(.000001*(mod(abs(Chk_Amt),10000000)-mod(abs(Chk_Amt),1000000)),
1,'Un ',
2,'Dos ',
3,'Tres ',
4,'Cuatro ',
5,'Cinco ',
6,'Seis ',
7,'Siete ',
8,'Ocho ',
9,'Nueve ',
0,NULL,
'ERROR '))) ||
decode(trunc(Chk_amt/1000000),
0,NULL,
1,'Millon ',
'Millones ') ||
decode(.00001*(mod(abs(Chk_Amt),1000000)-mod(abs(Chk_Amt),100000)),
1,decode(mod(trunc(Chk_Amt/1000),1000)-100, 0,'Cien ','Ciento '),
2,'Doscientos ',
3,'Trescientos ',
4,'Cuatrocientos ',
5,'Quinientos ',
6,'Seiscientos ',
7,'Setecientos ',
8,'Ochocientos ',
9,'Novecientos ',
0,null,
'ERROR ') ||
decode(.0001*(mod(abs(Chk_Amt),100000)-mod(abs(Chk_amt),10000)),
1,(decode(.001*(mod(abs(Chk_Amt),10000)-mod(abs(Chk_Amt),1000)),
0,'Diez ',
1,'Once ',
2,'Doce ',
3,'Trece ',
4,'Catorce ',
5,'Quince ',
6,'Dieciseis ',
7,'Diecisiete ',
8,'Dieciocho ',
9,'Diecinueve ',
'ERROR')),
2,(decode(.001*(mod(abs(Chk_Amt),10000)-mod(abs(Chk_Amt),1000)),
0,'Veinte ',
1,'Veintiun ',
2,'Veintidos ',
3,'Veintitres ',
4,'Veinticuatro ',
5,'Veinticinco ',
6,'Veintiseis ',
7,'Veintisiete ',
8,'Veintiocho ',
9,'Veintinueve ',
'ERROR ')),
3,'Treinta ',
4,'Cuarenta ',
5,'Cincuenta ',
6,'Sesenta ',
7,'Setenta ',
8,'Ochenta ',
9,'Noventa ',
NULL) ||
decode(.001*(mod(abs(Chk_Amt),10000)-mod(abs(Chk_Amt),1000)),
0,NULL,
(decode(.0001*(mod(abs(Chk_Amt),100000)-mod(abs(Chk_Amt),10000)),
0,NULL,
1,NULL,
2,NULL,
'y '))) ||
decode(.0001*(mod(abs(Chk_Amt),100000)-mod(abs(Chk_Amt),10000)),
1,NULL,
2,NULL,
(decode(.001*(mod(abs(Chk_Amt),10000)-mod(abs(Chk_Amt),1000)),
1,'Un ',
2,'Dos ',
3,'Tres ',
4,'Cuatro ',
5,'Cinco ',
6,'Seis ',
7,'Siete ',
8,'Ocho ',
9,'Nueve ',
0,NULL,
'ERROR '))) ||
decode(SIGN(abs(Chk_Amt)-999.99),
1,decode(.00001*(mod(abs(Chk_Amt),1000000)-mod(abs(Chk_Amt),100000)),
0,decode (.0001*(mod(abs(Chk_Amt),100000)-mod(abs(Chk_Amt),10000)),
0,decode(.001*(mod(abs(Chk_Amt),10000)-mod(abs(Chk_Amt),1000)),
0,NULL,
'Mil '),
'Mil '),
'Mil '),
NULL) ||
decode(.01*(mod(abs(Chk_Amt),1000)-mod(abs(Chk_Amt),100)),
1,decode(mod(trunc(Chk_Amt),1000)-100, 0,'Cien ','Ciento '),
2,'Doscientos ',
3,'Trescientos ',
4,'Cuatrocientos ',
5,'Quinientos ',
6,'Seiscientos ',
7,'Setecientos ',
8,'Ochocientos ',
9,'Novecientos ',
NULL) ||
decode(.1*(mod(abs(Chk_Amt),100)-mod(abs(Chk_Amt),10)),
1,(decode(trunc(mod(abs(Chk_Amt),10)),
0,'Diez ',
1,'Once ',
2,'Doce ',
3,'Trece ',
4,'Catorce ',
5,'Quince ',
6,'Dieciseis ',
7,'Diecisiete ',
8,'Dieciocho ',
9,'Diecinueve ',
'ERROR ')),
2,(decode(trunc(mod(abs(Chk_Amt),10)),
0,'Veinte ',
1,'Veintiun ',
2,'Veintidos ',
3,'Veintitres ',
4,'Veinticuatro ',
5,'Veinticinco ',
6,'Veintiseis ',
7,'Veintisiete ',
8,'Veintiocho ',
9,'Veintinueve ',
'ERROR ')),
2,'Veinte ',
3,'Treinta ',
4,'Cuarenta ',
5,'Cincuenta ',
6,'Sesenta ',
7,'Setenta ',
8,'Ochenta ',
9,'Noventa ',
NULL) ||
decode(trunc(mod(abs(Chk_Amt),10)),
0,NULL,
(decode(.1*(mod(abs(Chk_Amt),100)-mod(abs(Chk_Amt),10)),
0,NULL,
1,NULL,
2,NULL,
'y '))) ||
decode(.1*(mod(abs(Chk_Amt),100)-mod(abs(Chk_Amt),10)),
1,NULL,
2,NULL,
(decode(trunc(mod(abs(Chk_Amt),10)),
1,'Un ',
2,'Dos ',
3,'Tres ',
4,'Cuatro ',
5,'Cinco ',
6,'Seis ',
7,'Siete ',
8,'Ocho ',
9,'Nueve ',
0,null,
'ERROR '))) ||
decode(trunc(abs(Chk_Amt)),
0, 'Cero ',
null) ||
decode(100*(abs(Chk_Amt)-trunc(abs(Chk_Amt))),
0,'pesos', 'pesos con ' || TO_CHAR(ABS(100*(abs(Chk_Amt)-trunc(abs(Chk_Amt))))) || ' Centavos ')
INTO l_amt_spanish1
FROM dual;
SELECT t.DESCRIPTION
INTO V_Description
FROM FND_FLEX_VALUES v,
FND_FLEX_VALUE_SETS s,
FND_FLEX_VALUES_TL t
WHERE v.FLEX_VALUE_SET_ID = s.FLEX_VALUE_SET_ID
AND t.FLEX_VALUE_ID = v.FLEX_VALUE_ID
AND v.FLEX_VALUE = P_Vset_Value
AND s.FLEX_VALUE_SET_NAME = P_Vset_Name
AND rownum = 1 ;
select v.DESCRIPTION
into V_Description
from FND_FLEX_VALUES v
,FND_FLEX_VALUE_SETS s
where v.FLEX_VALUE_SET_ID = s.FLEX_VALUE_SET_ID
and v.FLEX_VALUE = P_Vset_Value
and s.FLEX_VALUE_SET_NAME = P_Vset_Name
and rownum = 1;