The following lines contain the word 'select', 'insert', 'update' or 'delete':
IS SELECT country FROM HZ_LOCATIONS
WHERE LOCATION_ID = p_location_id;
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
IS SELECT country FROM HZ_LOCATIONS
WHERE LOCATION_ID = p_location_id;
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
l_sql_string := 'select count(1) from HZ_STYLE_FMT_VARIATIONS ' ||
'where STYLE_FORMAT_CODE = :1 ' ||
'and VARIATION_NUMBER = 2 ' ||
'and (SYSDATE > start_date_active ' ||
'and SYSDATE <= NVL(end_date_active, SYSDATE))';
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
SELECT
c.column_name,
c.column_type,
c.width
FROM
fnd_tables t,
fnd_primary_keys pk,
fnd_primary_key_columns pkc,
fnd_columns c
WHERE
t.table_name = p_table_name
AND pk.application_id = t.application_id
AND pk.table_id = t.table_id
AND pkc.application_id = pk.application_id
AND pkc.table_id = pk.table_id
AND pkc.primary_key_id = pk.primary_key_id
AND c.application_id = pkc.application_id
AND c.table_id = pkc.table_id
AND c.column_id = pkc.column_id
ORDER BY
pkc.primary_key_sequence;
SELECT COUNT(TABLE_ID) INTO l_tab_count
FROM FND_TABLES WHERE TABLE_NAME = p_object_code;
select style_format_code into l_style_format_code
from hz_style_formats_b
where style_format_code = p_style_format_code;
| single line, with line breaks inserted.
|
| SCOPE: Public
|
+=========================================================================*/
FUNCTION format_address(
p_location_id IN NUMBER,
p_style_code IN VARCHAR2,
p_style_format_code IN VARCHAR2,
p_line_break IN VARCHAR2,
p_space_replace IN VARCHAR2,
p_to_language_code IN VARCHAR2,
p_country_name_lang IN VARCHAR2,
p_from_territory_code IN VARCHAR2
) RETURN VARCHAR2
IS
l_return_status VARCHAR2(1);
| single line, with line breaks inserted.
|
| SCOPE: Public
|
| ARGUMENTS:
|
+=========================================================================*/
FUNCTION format_name (
p_party_id IN NUMBER,
p_style_code IN VARCHAR2,
p_style_format_code IN VARCHAR2,
p_line_break IN VARCHAR2,
p_space_replace IN VARCHAR2,
p_ref_language_code IN VARCHAR2,
p_ref_territory_code IN VARCHAR2
) RETURN VARCHAR2
IS
l_return_status VARCHAR2(1);
SELECT
hsf.style_format_code
FROM
hz_style_fmt_locales hsfl,
hz_style_formats_b hsf
WHERE
nvl(hsfl.territory_code,'X') = nvl(p_territory_code,'X')
AND nvl(hsfl.language_code,'X') = nvl(p_language_code,'X')
AND hsfl.style_format_code = hsf.style_format_code
AND hsf.style_code = p_style_code
AND (SYSDATE BETWEEN hsfl.start_date_active
AND NVL(hsfl.end_date_active, to_date('12/31/4712','MM/DD/YYYY')));
SELECT
hsf.style_format_code
FROM
hz_style_formats_b hsf
WHERE
hsf.default_flag = 'Y'
AND hsf.style_code = p_style_code;
/* The following functions are used by the seeded "selection condition" */
/* definitions (for selecting a layout variation) and by the attribute */
/* transformation functions. They are available for use in custom */
/* layouts. */
/* */
/**************************************************************************/
/*=========================================================================+
|
| FUNCTION: use_neu_country_code
|
| DESCRIPTION
|
| This function determines if the "from country" (context information)
| as well as the "to country" both use the Northern European
| addressing format. This determines which of the Northern European
| layout variations to use.
|
| SCOPE: Public (limited)
| Intended to be used as a function for the "selection condition"
| of a layout variation.
|
| ARGUMENTS: (IN)
| p_territory_code Territory Code of the address ("to").
+=========================================================================*/
FUNCTION use_neu_country_format (
p_territory_code IN VARCHAR2
) RETURN VARCHAR2 -- boolean 'Y' or 'N' (cannot use BOOLEAN for SQL functions)
IS
l_context context_rec_type;
SELECT territory_short_name
FROM fnd_territories_tl
WHERE territory_code = p_territory_code
AND language=p_language;
| be selected as the default.
|
| SCOPE: Private
|
| ARGUMENTS: (IN)
| p_object_name The object for which you want to default style.
|
| (OUT)
| x_style_code Default Style. NULL if cannot determine.
|
+=========================================================================*/
PROCEDURE get_default_style (
p_object_name IN hz_styles_b.database_object_name%TYPE,
x_style_code OUT NOCOPY hz_styles_b.style_code%TYPE
) IS
l_style_code hz_styles_b.style_code%TYPE;
IS SELECT rownum, style_code FROM hz_styles_b WHERE database_object_name = p_object_name;
SELECT style_code
INTO l_style_code
FROM hz_styles_b
WHERE database_object_name = p_object_name;
select territory_code into l_territory_code
from fnd_territories
where nls_territory = l_nls_territory
and OBSOLETE_FLAG = 'N'
and rownum = 1;
SELECT fnd.territory_code
INTO g_territory_code
FROM nls_session_parameters nls,
fnd_territories fnd
WHERE nls.parameter = 'NLS_TERRITORY'
AND fnd.nls_territory = nls.value;
select territory_code into l_territory_code
from fnd_territories
where nls_territory = l_nls_territory
and OBSOLETE_FLAG = 'N'
and rownum = 1;
SELECT fnd.territory_code
INTO g_territory_code
FROM nls_session_parameters nls,
fnd_territories fnd
WHERE nls.parameter = 'NLS_TERRITORY'
AND fnd.nls_territory = nls.value;
SELECT
line_number,
position,
attribute_code,
use_initial_flag,
uppercase_flag,
transform_function,
delimiter_before,
delimiter_after,
blank_lines_before,
blank_lines_after
FROM hz_style_fmt_layouts_b
WHERE
style_format_code = p_style_format_code
AND variation_number = p_variation_number
AND (SYSDATE BETWEEN start_date_active
AND NVL(end_date_active, to_date('12/31/4712','MM/DD/YYYY')))
ORDER BY line_number, position;
x_sql_string := 'SELECT ' || x_sql_string || ' FROM '
|| p_table_name;
SELECT
variation_number,
selection_condition
FROM
hz_style_fmt_variations
WHERE
style_format_code = p_style_format_code
AND (SYSDATE BETWEEN start_date_active
AND NVL(end_date_active, to_date('12/31/4712','MM/DD/YYYY')))
ORDER BY
variation_rank;
IF l_variation.selection_condition IS NULL THEN
-- this is it. no condition - have to take it.
x_variation_num := l_variation.variation_number;
l_sql_string := 'SELECT 1 FROM ' || p_object_name
|| ' WHERE ' || p_object_pk_name || '=' || ' :1 '
|| ' AND ( ' || l_variation.selection_condition || ')';
SELECT
variation_number,
selection_condition
FROM
hz_style_fmt_variations
WHERE
style_format_code = p_style_format_code
AND (SYSDATE BETWEEN start_date_active
AND NVL(end_date_active, to_date('12/31/4712','MM/DD/YYYY')))
ORDER BY
variation_rank;
IF l_variation.selection_condition IS NULL THEN
-- this is it. no condition - have to take it.
x_variation_num := l_variation.variation_number;
l_sql_string := l_variation.selection_condition;
l_sql_string := 'SELECT 1 FROM DUAL WHERE ' || l_sql_string;
l_sql_string := 'SELECT ' || l_sql_string || 'FROM DUAL' ;