아래 예제는 문자열로 된 값을 날짜 타입으로 변경해서 두 값을 비교하는 방법이다. 문자열을 날짜 타입으로 변경하는 이유는 각각의 월마다 말일이 다르기 때문이다. "2018.02.25 ~ 2018.03.05"를 비교할 때, 2월은 28일까지밖에 없으니 날짜로 비교하는 것이 정확하다. 출처: https://shxrecord.tistory.com/140 [첫 발] [Javascript]날짜 비교 자바스크립트를 사용해 두 날짜의 차이를 비교하기 아래 예제는 문자열로 된 값을 날짜 타입으로 변경해서 두 값을 비교하는 방법이다. 문자열을 날짜 타입으로 변경하는 이유는 각각의 월마다 말일이 다르기 때문.. shxrecord.tistory.com
문제 : update TB_RECIPEset recipe_amt = #{recipeAmt} note = '' 이거 너무 짜증나고 곤란했는데jdbcType을 명시해주면 손쉽게 목표를 이룰 수 있다.note에 값이 있으면 그 값을 사용하고, 공백이거나 null이면 자동으로 null로 넣어준다. /* RecipeDAO.updateRecipe 레시피 정보 수정 */update TB_RECIPEset note = #{note, jdbcType=VARCHAR} , recipe_amt = #{recipeAmt}where recipe_seq = #{id}limit 1
OracleJDK에서 OpenJDK로 바꾸면서 환경변수 설정을 끝내고 이클립스 시작하려고 눌렀더니 뜬 에러 !!!!!!!!!!!!!! 찾아보니 두 가지 방법이 있다. 그 중 나는 두 번째 방법에서 오류를 고칠 수 있었다. 1. eclipse.ini 파일에서 Xms / Xmx 메모리 용량을 조절(증가)하고 다시 이클립스 켜기. 2. 그래도 안되면 eclipse.ini 파일에 vm위치 명시해주기 -vmC:\Java\java-1.8.0-openjdk-1.8.0.191-1.b12.ojdkbuild.windows.x86_64\jre\bin\server\jvm.dll 저렇게 vm위치 추가해주면 이클립스가 정상적으로 실행된다 !!
Database Link란? - 동시에 두 개의 다른 DB의 작업을 참조할 수 있게 하는 것이다. 원래는 DB 자체가 다르면 하나만 켤 수 있어서 하나를 켜면 그 전에 사용한 DB는 꺼진다고 한다. 생성 : CREATE DATABASE LINK ~ USING ( 나중에 구글링 할 때 이렇게 검색해보자. 대충 필기한 거라 정확히 안 적은 거 같다.) 접속방법 : CONN hr/hr@~CONN scott/tiger@~ 사용예시 : CONN hr/hr@~SELECT * FROM scott.테이블명@~ (synonym
보호되어 있는 글입니다.
BoardVO [seq=null, title=aa, writer=aaaaa, content=aa, regDate=null, cnt=0, searchKeyword=null, searchCondition=null] INFO : jdbc.connection - 1. Connection opened INFO : jdbc.audit - 1. Connection.new Connection returned INFO : jdbc.audit - 1. Connection.getAutoCommit() returned true INFO : jdbc.audit - 1. PreparedStatement.new PreparedStatement returned INFO : jdbc.audit - 1. Connection.prepar..
INFO : org.springframework.test.context.support.DefaultTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExec..
create or replace trigger expdate after insert or update or delete on stock for each row DECLARE d_product stock.p_name%type; d_date stock.e_date%type; BEGIN select p_name,e_date into d_product,d_date from stock where (e_date-8 > sysdate); if (d_date-8 > sysdate) then dbms_output.put_line('Please check' || d_product); end if; end expdate; / create or replace trigger save_productsafter insert or ..
package collection; import java.util.ArrayList; /** * * 스트링 타입의 리스트(숫자)의 합 * */public class ListExam1 {public static void main(String[] args) {ArrayList list = new ArrayList();list.add("100");list.add("50");list.add("10");// 합계계산출력String temp= null;int sum = 0;for(int i=0;i배)System.out.println(list);list.remove(1);System.out.println(list);list.remove(1); // 전체조회// 1. forString temp = null;for (i..