_대문 | 방명록 | 최근글 | 홈피소개 | 주인놈 |
FrontPage › View
|
|
[edit]
3 저장프로시저를 테이블처럼 이용하는 방법 #
[edit]
5 분할 뷰 예제 #--테이블 create table dbo.em_log_201309 ( tran_date datetime , val int ) create table dbo.em_log_201310 ( tran_date datetime , val int ) go create clustered index cix_tran_date on dbo.em_log_201309(tran_date) create clustered index cix_tran_date on dbo.em_log_201310(tran_date) go create view v_em_log as select tran_date, val from dbo.em_log_201309 where tran_date between '20130901' and '20130930' union all select tran_date, val from dbo.em_log_201310 where tran_date between '20131001' and '20131031' go --날짜 조건을 줘야 원하는 테이블에서만 데이터를 쪽 뽑음 select * from dbo.v_em_log where 1=1 and tran_date >= '20131011' and tran_date < '20131012'
|
성공의 보장은 없지만 시도조차 하지 않는 건 실패를 보장하는 길이다. 남들이 하는 방식으론 세계 제일이 될 수 없다. (jungim) |