Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 |
Tags
- Angular Router
- 스크롤 이벤트 감지
- scroll
- 아이오닉 스크롤 이벤트
- ApexChart
- 앵귤러 모달
- angular animation
- Oracle LISTAGG 사용 예시
- summary
- prisma
- flex-1
- formgroup
- 호버
- 앵귤러 애니메이션
- angular route
- angular button
- Router
- angular modal
- 스크롤 이벤트
- TAILWIND
- egov spring ajax 사용 예시
- Ionic modal
- modal
- 검색
- 셀렉트박스 커스텀
- ajax 사용 예시
- mysql if
- 옵저버블
- route
- 모달
Archives
- Today
- Total
깜놀하는 해므찌로
Egov Spring Oracle MyBatis NVL 사용 예시 / Oracle OR 본문
반응형
SMALL
<sql id="modalWhere">
<if test='popSearchCondition != null and popSearchCondition !="" and popSearchCondition ==0'>
AND (A.NAME LIKE '%' || #{popSearchKeyword} || '%' OR B.C_CODE_NM LIKE '%' || #{popSearchKeyword} || '%')
</if>
<if test="popSearchCondition !=null and popSearchCondition !='' and popSearchCondition ==1">
AND A.NAME LIKE '%' || #{popSearchKeyword} || '%'
</if>
<if test="popSearchCondition !=null and popSearchCondition !='' and popSearchCondition ==2">
AND B.C_CODE_NM LIKE '%' || #{popSearchKeyword} || '%'
</if>
<if test="popDivn !=null and popDivn !=''">
<choose>
<when test='popDivn.equals("fvrts")'>
AND NVL(C.FVRTS_SEQ, 'N') = 'Y'
</when>
<when test='popDivn.equals("2,3")'>
AND (A.WORK_DIV = '2' OR A.WORK_DIV = '3')
</when>
<otherwise>
AND A.WORK_DIV LIKE '%' || #{popDivn} || '%'
</otherwise>
</choose>
</if>
</sql>
1. 검색어, 검색 조건에 따른 Like 함수 활용
2. NVL(널 체크 할 값, 널일 경우 반환할 값)
3. Oracle 경우 or 는 OR 로 표기
반응형
LIST
'IT' 카테고리의 다른 글
Oracle 삼항연산자 Decode 예시 / MySQL IF (0) | 2022.07.21 |
---|---|
MyBatis Oracle LISTAGG 사용 예시 / MySQL GROUP_CONCAT / 엑셀 다운 (0) | 2022.07.21 |
JSTL 삼항연산자 || or / 연속 삼항 연산자 예시 (0) | 2022.07.19 |
체크박스 checkbox 전체 체크 설정 Tip (0) | 2022.07.19 |
Egov Spring Oracle 현재 날짜 시간 입력 / SYSDATE 예시 / Oracle NVL 예시 (0) | 2022.07.19 |