245: -- Therefore, we will include the condition of "label_id is null" in the following select.
246: -- Similarly, with equipment_instance.
247: -- For safety, include rownum=1.
248:
249: --Bug fix 2726195 replaced table name with view wsh_report_printers_v
250:
251: if (p_equipment_instance is not null ) then
252: begin
253: -- Removed Label_Id from Query for Bug 2996792.
252: begin
253: -- Removed Label_Id from Query for Bug 2996792.
254: select printer_name
255: into x_printer
256: from wsh_report_printers_v
257: where nvl(default_printer_flag,'N') = 'Y'
258: and enabled_flag = 'Y'
259: and concurrent_program_id = p_concurrent_program_id
260: and level_type_id = 10001 -- site level
410: p_level_value_id IN VARCHAR2,
411: p_equipment_instance IN VARCHAR2,
412: x_printer OUT NOCOPY VARCHAR2) is
413: --
414: --Bug fix 2726195 replaced table name with view wsh_report_printers_v
415: --
416: cursor printer is
417: select printer_name
418: from wsh_report_printers_v
414: --Bug fix 2726195 replaced table name with view wsh_report_printers_v
415: --
416: cursor printer is
417: select printer_name
418: from wsh_report_printers_v
419: where nvl(default_printer_flag,'N') = 'Y'
420: and enabled_flag = 'Y'
421: and concurrent_program_id = p_concurrent_program_id
422: and level_type_id = p_level_type_id