create or replace package body bis_utils as /* ***************************************************************************** * $Id : $ * $Author : $ * $DateTime : $ * $Change : $ * * Beschreibung: * Array Versus Tabelle. * Das Paket liest die Daten einer Tabelle aus, mit deren * ein Array gefuellt werden wird. * * Historie: * 16.08.2009 FJ Erzeugung der Datei. ***************************************************************************** */ function get_host_url(hostalias# in varchar2, enterprise_id# in number default 1) return varchar2 is hostname# varchar2(255); begin select decode(h.protocol, null, '', '', '', h.protocol || '://') || h.hostname || decode(h.port, null, '', '', '', ':' || to_char(h.port)) into hostname# from hostname_mapping h where h.hostalias = upper(hostalias#) and h.enterprise_id = enterprise_id#; return(hostname#); exception when no_data_found then raise_application_error(-20001, 'Host zu Alias ' || hostalias# || ' nicht gefunden!'); when too_many_rows then raise_application_error(-20002, 'Host zu Alias ' || hostalias# || ' ist nicht eindeutig!'); when others then raise_application_error(-20003, sqlerrm); end get_host_url; End bis_utils ; /