public static String[] insertSqls ={
"INSERT INTO noti_table(LOG_ID, REG_DT) "
+ "SELECT NVL(MAX(LOG_ID), 0) ERROR_LOG_ID , now()\r\n"
+ "from src_table "
+ "where 1=1\r\n"
+ " and DATE_FORMAT(REG_DT, '%Y%m%d') = ? \r\n"
,
"INSERT INTO noti_table(LOG_ID, REG_DT) "
+ "SELECT NVL(MAX(LOG_ID), 0) ERROR_LOG_ID , now() \r\n"
+ "from src_table \r\n"
+ "where REGR_ID = 'API'\r\n"
+ "and RESP_CD != '200'\r\n"
+ "and DATE_FORMAT(REG_DT, '%Y%m%d') = ? "
}
Arrays.asList(insertSqls).forEach((String qry) -> {
System.out.println("qry15:" + qry);
jdbcTemplate.update(qry, requestDate.substring(0 ,8));
});
'java'에 해당되는 글 27건
- 2021.01.27 java, String array foreach
- 2015.03.19 ibatis db session timeout 설정
- 2014.04.06 java, j2sdk1.4.2_03 download url
- 2014.03.24 java, log4sql
- 2014.03.20 java, log4sql mysql
- 2014.03.20 java, eclipse 에 jar 추가
- 2014.03.05 java, dir 아래 파일 목록 출력
- 2014.03.05 eclipse 마우스 선택 후 다음 찾기
- 2014.02.14 objectaid 설명
- 2014.02.12 java 한글 파일 읽기
sql-map-config.xml defaultStatementTimeout
(java 2014/02/26 10:17 처음 작성, 스팸 댓글 때문에 지웠다가 다시 작성)
http://blog.naver.com/PostView.nhn?blogId=echris7&logNo=140022430449
//package com.samsung.recommendation.post.dataupload.impl;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.RandomAccessFile;
import java.sql.DriverManager;
import java.sql.ResultSet;
//import java.*;
import java.sql.SQLException;
import java.util.ArrayList;
//import com.samsung.recommendation.dc.ExampleItemReader;
public class TestPPExistsFullDirectory {
//private ExampleItemReader reader = new ExampleItemReader();
public static void main(String[] args) throws FileNotFoundException{
int result = 1;
String filePathLoop = "d:/mydir";
File fileLoop;
fileLoop = new File(filePathLoop);
System.out.println("fileLoop.isDirectory() >>>" + fileLoop.isDirectory());
if (fileLoop.isDirectory()) { // 디렉토리면 ...
File subLoop[] = fileLoop.listFiles();
for(int b = 0 ; b < subLoop.length; b++){
System.out.println("dir list >>>"+subLoop[b].getPath());
}
}
System.exit(result);
}
}
http://blog.naver.com/PostView.nhn?blogId=netrance&logNo=110159806133
http://shonm.tistory.com/category/JAVA/TEXT%ED%8C%8C%EC%9D%BC%20%EC%9D%BD%EC%9D%84%20%EB%95%8C%20%ED%95%9C%EA%B8%80%20%EA%B9%A8%EC%A7%90