티스토리 뷰

QueryDsl 

booleanBuilder.and([VO명].dt.minute().mod(10).eq(0));

 select wtflow0_.DT as col_0_0_,
        wtflow0_.BLOCK_CDE as col_1_0_,
        wtflow0_.FLW as col_2_0_,
        wtflow0_.VEL as col_3_0_,
        wtflow0_.WAL as col_4_0_,
        wtflow0_.ACM as col_5_0_,
        wtflow0_.HMD as col_6_0_,
        wtflow0_.PRS as col_7_0_,
        wtflow0_.TMP as col_8_0_,
        wtflow0_.SUN_ST as col_9_0_,
        wtflow0_.PWR_ST as col_10_0_,
        wtflow0_.SD_ST as col_11_0_,
        wtflow0_.WAL_SSR_ST as col_12_0_,
        wtflow0_.DOOR_ST as col_13_0_,
        wtflow0_.VEL_MTR_ST as col_14_0_,
        wtrain2_.INSTM_CDE as col_15_0_,
        wtrain2_.RAIN as col_16_0_,
        wtqlty3_.QLTY as col_17_0_
   from II_WT_FLOW wtflow0_ inner join II_BLOCK block1_ on (wtflow0_.BLOCK_CDE=block1_.BLOCK_CDE) left outer join II_WT_RAIN wtrain2_ on (wtflow0_.DT=wtrain2_.DT
    and block1_.RF_METR_CDE=wtrain2_.INSTM_CDE) left outer join II_WT_QLTY wtqlty3_ on (wtflow0_.DT=wtqlty3_.DT
    and block1_.BLOCK_CDE=wtqlty3_.BLOCK_CDE)
  where wtflow0_.BLOCK_CDE= 'OKCH002A'
    and wtflow0_.DT>= to_date('2020-09-22 01:00','yyyy-mm-dd hh24:mi')
    and wtflow0_.DT<= to_date('2020-09-22 02:00','yyyy-mm-dd hh24:mi')
    and mod(extract(minute from wtflow0_.DT),10) =0
  order by wtflow0_.DT asc

mod(extract(minute from [table명].dt),10) = 0 -- date형 데이터에서 분값을 추출하여 10으로 나눈 나머지 0인 데이터 

 

 

'Skill > JPA' 카테고리의 다른 글

[JPA] DB Table 자동 수정  (0) 2021.02.03
eclipse로 DB table에서 Entity(vo)클래스 만들기  (0) 2021.01.18
Hibernate enable_lazy_load_no_trans Property  (0) 2020.08.18
[JPA] DB에 없는 필드 관련  (0) 2020.08.14
[JPA] Open Session In View  (0) 2020.06.26
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
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
글 보관함