SQLServer의 View를 Excel 표시
소개
SQLServer 데이터베이스의 View를 Excel에 표시하는 절차를 설명합니다.
[이용 장면]
DB상의 View로 출력하는 숫자나 산출·항목명을 일본어 변환해, Excel 리포트로서 출력하는 등.
의외로 간단하고 편리!
전제
View 준비
SQLServer에 다음과 같은 View를 작성합니다.
CREATE VIEW [dbo].[月別部門別売上ビュー] AS (
SELECT
t1.YearMonth AS 年月
,t1.DeptCode AS 部門コード
,t1.SalesAmount AS 売上金額
FROM
T_SalesAmt t1
)
테스트 데이터는 다음

Excel에서 연결 절차
CREATE VIEW [dbo].[月別部門別売上ビュー] AS (
SELECT
t1.YearMonth AS 年月
,t1.DeptCode AS 部門コード
,t1.SalesAmount AS 売上金額
FROM
T_SalesAmt t1
)

동일한 서버에 있다면 localhost.
인증 방법은, Windows 인증인가, SQLServer 인증인가를 선택해, 설정.




성공!

Reference
이 문제에 관하여(SQLServer의 View를 Excel 표시), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/yuruise/items/56cc01bf6bbabcc913b3텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)