SQL서버 에서 제공되는 ROLLUP을 사용하면 그룹간의 소계 및 전체 합계를 쉽게 구할 수 있다. create table test1 (id int, dept_code int, qty int) insert into test1 (id, dept_code, qty) select 4, 200, 1450 union all select 6, 300, 1230 union all select 3, 100, 3000 union all select 1, 100, 1000 union all select 5, 200, 2540 union all select 2, 100, 2000 select case when dept_code is null and id is null then '합계' when id is null then ..
SQL서버에서 Oracle을 연결된 서버로 구성한 후 OpenQuery로 조회를 하면 메시지 9803, 수준 16, 상태 1, 줄 1 "numeric" 유형에 대한 데이터가 잘못되었습니다. 라는 오류가 발생 할 때가 있다. 원인은 Oracle 테이블에서 Type이 int 나 decimal인 컬럼을 사용하게 되면 발생 한다. 연결된 서버 구성시 공급자를 'Oracle Providier for OLE DB'로 지정 했을 때 이런 현상이 있다. (공급자를 Microsoft OLE DB Provider for Oracle로 했을 때는 어떤 지는 모르겠다. 참고로 연결된 서버로 Oracle 을 추가한 후 공급자 속성에서 반드시 Inprocess허용을 해줘야 된다.) 오류를 해결 하기 위해서는 두가지 정도의 방법이..
SP 수행결과를 테이블에 저장하려면 다음과 같이 한다. (아래 예는 sp_lock 결과를 저장 함) 1) 저장할 테이블 생성 create table lockinfo (spid int, dbid int, objid int, lndld int, type char(50), resource char(100), mode char(20), status char(50)) 2) SP 수행 결과를 테이블에 저장 insert into lockinfo exec sp_lock 3) 결과 조회 select distinct spid from lockinfo where mode = 'X'
- Total
- 380,576
- Today
- 87
- Yesterday
- 134
- 마우스
- Delphi
- Stroke it
- sql서버
- ERP
- 예상 행 수
- Linked Server
- NHN
- c#
- SQL서버 2008
- Oracle
- IE 9.0
- 태그를 입력해 주세요.
- CD버너
- javascript
- java
- 델파이
- SSMS
- MSSQL
- Windows Mobile Device Center
- windows 7
- 실행계획
- 삭제된 파일 복구
- 연결된 서버
- Mac OS X Snow Leopard
- 아이폰 4G
- node.js
- 프로젝트
- php
- OpenQuery