내가 내 SQL 쿼리에 조건을 경우 확인하려면 오라클 작업하는 경우
이 내 SQL 쿼리 :
SELECT unit.id_unit AS id,
unitLang.abbreviated_name_unit|| ' - ' ||unitLang.name_unit_lang
AS name_unit_lang
FROM unit unit
LEFT OUTER JOIN employee on employee.id_unit = unit.id_unit
LEFT OUTER JOIN unit_lang unitLang on unitLang.id_unit = unit.id_unit
LEFT OUTER JOIN security_employee_unit secUnit ON unit.id_unit = secUnit.id_unit
where unitLang.lang_unit_lang = 'ar' and
unit.statut = '1' and
employee.id_employe = 'EM-000008' or
secUnit.id_employee = 'EM-000008' AND
secUnit.type = 'S'
내가 테스트를 추가 할
이것은 내 테스트입니다 :
if unit.id_unit = 'allorg'쿼리에이 synt가 있습니다. 도끼 : 처음에는이 쿼리를 실행해야이 기능에
: 나는 기능을 deveop 할
: 나는 업데이트 내 쿼리
에서이 테스트를 할 수있는 방법
SELECT unit.id_unit AS id,
unitLang.abbreviated_name_unit|| ' - ' ||unitLang.name_unit_lang
AS name_unit_lang
FROM unit_lang unitLang, unit unit
where unit.id_unit = unitLang.id_unit and
unitLang.lang_unit_lang = 'ar' and
unit.statut = '1'
SELECT unit.id_unit AS id,
unitLang.abbreviated_name_unit|| ' - ' ||unitLang.name_unit_lang
AS name_unit_lang
FROM unit unit
LEFT OUTER JOIN employee on employee.id_unit = unit.id_unit
LEFT OUTER JOIN unit_lang unitLang on unitLang.id_unit = unit.id_unit
LEFT OUTER JOIN security_employee_unit secUnit ON unit.id_unit = secUnit.id_unit
where unitLang.lang_unit_lang = 'ar' and
unit.statut = '1' and
employee.id_employe = 'EM-000008' or
secUnit.id_employee = 'EM-000008' AND
secUnit.type = 'S'
내 함수의 결과가
SELECT unit.id_unit AS id,
unitLang.abbreviated_name_unit|| ' - ' ||unitLang.name_unit_lang
AS name_unit_lang
FROM unit_lang unitLang, unit unit
where unit.id_unit = unitLang.id_unit and
unitLang.lang_unit_lang = 'ar' and
unit.statut = '1'
를 사용하여 저장 프로 시저를 작동합니다. 그리고 동적 쿼리를 만드십시오. –
'allorg' 란 무엇입니까? –
allorg is id_unit, – franco