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
- flex-1
- formgroup
- ApexChart
- route
- Router
- 스크롤 이벤트 감지
- angular route
- scroll
- angular button
- angular animation
- ajax 사용 예시
- 아이오닉 스크롤 이벤트
- Oracle LISTAGG 사용 예시
- TAILWIND
- mysql if
- 모달
- Ionic modal
- summary
- angular modal
- 앵귤러 애니메이션
- 검색
- 셀렉트박스 커스텀
- Angular Router
- prisma
- 옵저버블
- 앵귤러 모달
- 스크롤 이벤트
- modal
- 호버
- egov spring ajax 사용 예시
Archives
- Today
- Total
깜놀하는 해므찌로
Egov Spring Oracle Concat 오라클 문자열 합치기 예시 본문
반응형
SMALL
- 기본 구조
SELECT CONCAT('1234', '5678')
, '1234' || '5678'
FROM DUAL
1. 둘 다 동일한 결과 '12345678' 출력
- 검색 응용
<if test="searchKeyword !=null and searchKeyword !=''">
<if test="searchCondition !=null and searchCondition !='' and searchCondition ==0">
AND (TS.TTL LIKE '%'||#{searchKeyword}||'%' OR TS.CTT like '%'||#{searchKeyword}||'%')
</if>
<if test="searchCondition !=null and searchCondition !='' and searchCondition ==1">
AND TS.TTL LIKE '%'||#{searchKeyword}||'%'
</if>
<if test="searchCondition !=null and searchCondition !='' and searchCondition ==2">
AND TS.CTT LIKE '%'||#{searchKeyword}||'%'
</if>
</if>
1. 검색어가 들어올 경우 LIKE 조건 활용 시 변수 앞뒤에 '%' 가 필요
2. CONCAT 함수 대신 ' || ' 를 활용하여 간략하게 표기 가능
반응형
LIST
'IT' 카테고리의 다른 글
Oracle ROWUNM, OVER 사용 예시 / MySQL LIMIT (0) | 2022.07.15 |
---|---|
Oracle 날짜 포멧 TO_CHAR 사용 예시 (0) | 2022.07.15 |
Egov Spring 목록 버튼 누를 시 검색어, 검색 조건, 게시판 종류 기억하고 리스트로 돌아가기 (0) | 2022.07.15 |
Egov Spring Controller Java ajax 글 수정 시 곧바로 view 보여주기 컨트롤러 예시 (0) | 2022.07.14 |
CSS <a> a태그 글씨 높이 중앙 정렬 (0) | 2022.07.13 |