본문 바로가기

전체 글

대청댐상류 일출 최근 활동무대가 대전/충남권이다보니...^^ 대청댐 상류에서 담은 새벽의 일출~ 머... 빛은 부족하고 구름이 많았지만 나름대로 소박한 분위기... 더보기
2006년 갑사의 가을 더보기
db Station 레퍼토리 보호되어 있는 글입니다. 더보기
작업월의 마지막날짜 2자리 찾아오기 select convert(char(20),days(date(cast(dateformat(months(today(),1),'yyyymmdd') as char(6)) || '01'), -1),112) 더보기
Grant 된 테이블 및 해당테이블 유저찾기 select b.table_name as 대상테이블, c.name as 권한부여된ID, a.selectauth as SELECT권한여부 from systableperm a , systable b, sysusers c where a.grantor=459 and a.ttable_id *= b.table_id and a.grantee *= c.uid order by b.table_name asc 더보기
ASIQ Index 정보 인덱스종류 FP : Fast Projection -> create table YY_백승희_TEST1 ( AAA char(13) UNIQUE ); -> 특정칼럼에 UNIQUE 옵션줄때 자동생성됨 -> Distinct 값이 256 이하이면 1Byte FP인덱스생성됨 -> Distinct 값이 256 이상이면 2Byte FP인덱스생성됨(1Byte보다 Perfomance좋음) LF : Low Fast (Low Cadinality Data) -> Unique Value가 1500 미만일때 적당 -> Where 절의 조건칼럼, Min, Max함수사용칼럼, Group By 구문에 사용시 적절 -> Column Example : Male/Female, Yes/No, Product Name, State or Provin.. 더보기
윤년 알고리즘 윤년을 구하는 알고리즘(An algorithm for leap year) 윤년이 되면 1년이 366일 되고, 평년의 경우에는 365일이 된다. 윤년을 구하는 방법은, 우선 4의 배수가 되는 해는 일단 윤년의 후보가 된다. 이 때, 4의 배수이면서 100의 배수이면서 400의 배수가 되면 윤년이 되나, 400의 배수가 아니면 윤년이 아니다. 그리고 나머지 4의 배수이면서 100의 배수가 아닌 경우에 윤년이 되는 것이다. 이와 같은 윤년의 조건을 표로 정리하면 다음과 같다. 4의 배수 100의 배수 400의 배수 윤년의 여부 O O O YES O O X NO O X X YES X X X NO int getDaysOfMonth(int mon, int year){ /* int mon : month of the .. 더보기
Convert 함수 SELECT CONVERT(칼럼명, INTEGER, 5.2) FROM DUMMY; 5 data-type The data type to which the expression will be converted. expression The expression to be converted. format-style For converting strings to date or time data types and vice versa, the format style is a style code number that describes the date format string to be used. The values of the format-style argument have the following meanings: Wi.. 더보기