AC002PF 
AC011PF       

SELECT * FROM TYLIB.COMPANY

SELECT * FROM TYLIB.FUNDINFO  --펀드정보

SELECT * FROM TYLIB.PARTNERINFO --조합원정보

SELECT * FROM TYLIB.INVDISMST --출자자약정내역/출자내역

SELECT * FROM TYLIB.INVDISDTL --출자자약정내역/출자내역

SELECT * FROM TYLIB.CORPINFO --투자기업정보

SELECT * FROM TYLIB.COINFO --투자기업정보/투자기업자본금

SELECT * FROM TYLIB.COBSPL --투자기업BSPL

SELECT * FROM TYLIB.COJUJU --투자기업주주명부

SELECT * FROM TYLIB.PERSON --인사정보

SELECT * FROM TYLIB.COIDMNGER_NEW --투자기업심사역정보

SELECT * FROM TYLIB.TRADEMST --투자원장

SELECT * FROM TYLIB.TB_IL1090M --프로젝트정보

SELECT * FROM TYLIB.NMCUSTPF --거래처관리

SELECT * FROM TYLIB.NGBLHDPF --전표마스터
WHERE TRIM(BLHD_REMK) IS NOT NULL

SELECT * FROM TYLIB.NGBLDTPF --전표디테일

SELECT * FROM TYLIB.BASC005 --계좌관리

SELECT * FROM TYLIB.NMACCDPF --계정과목

SELECT * fROM TYLIB.CODTBLPF --코드테이블


본건소속재원
┌----------┬--------------┬--------------┬--------------┬------------------┬--------------┐
│          │  총발행주수  │   소유주수   │  지분율(%)   │       금액       │   평균단가   │
├----------┼--------------┼--------------┼--------------┼------------------┼--------------┤
│본건취급전│     5,357,048│       105,600│          1.97│       501,600,000│         4,750│
├----------┼--------------┼--------------┼--------------┼------------------┼--------------┤
│본건취급후│     5,357,048│        60,083│          1.12│       285,394,250│         4,750│
└----------┴--------------┴--------------┴--------------┴------------------┴--------------┘

SELECT * FROM VCRPT.KIF_AC001PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_AC002PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_AC011PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_AC021PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_AC022PF WHERE VCOID='TYLIB'


SELECT
		'TYLIB'					AS VCOID
	,	REPLACE(FCD,'SBCLIB2','')		AS FTYP
	,	OCS_RPT_TPCD				AS OCS_RPT_TPCD
	,	RPT_DT					AS REPORTDT
	,	SEQ						AS SEQ
	,	RPT_OTLN					AS RPTSUMMARY
	,	MAST_RPTR_NM				AS FUNDMANAGER
	,	RPT_ADMN_NM				AS OBSERVER
	,	CHG_EMPNO				AS CHGID
	,	CHG_DTM					AS CHGDT
	,	RPT_DT					AS OCCURDT
	,	CONFIRM_YN				AS CONFIRMYN
	,	ACCOUNT					AS ACCOUNT
	,	PAY_REQ_DATE				AS PAY_REQ_DATE
	,	INV_AMT					AS INV_AMT
	,	ADMIN_PAY					AS ADMIN_PAY
	,	USE_EXP					AS USE_EXP
	,	INVTEXNO					AS INVTEXNO
	,	TITLE						AS TITLE
	,	PAY_REQ_AMT				AS PAY_REQ_AMT
FROM VCRPT.KIF_FCNTR_OCS_RPT_PTCL
WHERE FCD LIKE '%TYLIB%'


SELECT 
          MNGSYSNO AS VCOID
          , REPLACE(FCD,MNGSYSNO,'') AS FTYP
          , RPT_DT AS REPORTDT
          , SEQ
          , OCS_RPITM_TPCD AS PRTIEM
          , CRPD_YN AS RESULTYN
          , CHG_EMPNO
          , WRK_DTM
FROM      VCRPT.KIF_FCNTR_OCS_RPITM_INFO         
WHERE MNGSYSNO='TYLIB'  


 SELECT INVTEXNO AS AUDITSEQ
 , INVTEX_STAT_TPCD AS GBN
 , IN_SN AS SEQ
 , IN_DT AS WRITEDT
 , MNGSYSNO AS VCOID
 , '유안타인베스트먼트' AS GPNM
 , IN_GP_EMPNO AS WRITERID
 , '' AS WRITERNM
 , MEMO_OTLN AS COMMENTS
 , '' AS CONFIRMID
 , '' AS CONFIRMDT
 FROM VCRPT.KIF_INVTEX_SCHD_MEMO_PTCL
 WHERE MNGSYSNO='TYLIB'



  SELECT	DISTINCT					    
	MAIN.INVTEXNO		AS	AUDITSEQ		 --	투자심사번호
 ,	MAIN.IR_DT		AS	AUDITDT		 --	IR일자
 ,	MAIN.GPNO		AS	VCOID		 --	GP코드
 ,	SUBSTR(MAIN.FCD,LENGTH(MAIN.GPNO), LENGTH(MAIN.FCD)) 		AS	FTYP		 --	조합코드
 ,	MAIN.GP_ENT_NO		AS	COID		 --	기업코드
 ,	MAIN.BIZNO		AS	BUSNO		 --	사업자번호
 ,	MAIN.IR_LOC_NM		AS	AUDITPLACE		 --	IR장소
 ,	MAIN.IR_TIME		AS	AUDITTIME		 --	IR시간
 ,	MAIN.IR_CROP_GP_EMPNO		AS	IR_CROP_GP_EMPNO		 --	책임심사역
 ,	MAIN.IR_OBJ_INDS_NM		AS	KIND		 --	업종
 ,	MAIN.ESTB_DT		AS	ESTB_DT		 --	설립일
 ,	MAIN.PRSD_NM		AS	CEONM		 --	대표이사
 ,	MAIN.INVT_ENT_MAN_OGN_CNT		AS	PER_CNT		 --	직원수
 ,	MAIN.IR_JUJULIST		AS	JUJULIST		 --	주주구성
 ,	MAIN.CAPT_AMT		AS	CAPT_AMT		 --	자본금
 ,	MAIN.IR_MAINFIELD		AS	INVTEX_INVT_FLD_TPCD		 --	투자분야
 ,	MAIN.IR_DETAILFIELD		AS	INVTEX_INVT_FLD_DTL_TPCD		 --	투자분야상세
 ,	CASE WHEN FIL.INVTEX_STAT_TPCD ='0' AND FIL.FILE_SN='1' AND FIL.INVTEX_FILE_TPCD='0' THEN FIL.INVTEX_REL_FNN ELSE '' END		AS	UPFILE		 --	IR자료첨부화일
 ,	MAIN.INVTEX_DAT_ACCP_TPCD		AS	CONFIRMYN		 --	확인여부
 ,	MAIN.IR_COM_YN		AS	IR_COM_YN		 --	IR접수여부
  ,	MAIN.IR_MAINFIELD2	 AS INVTEX_INVT_FLD_TPCD2
FROM  INVTEX_INFO@KIF MAIN  , INVTEX_FILE_PTCL@KIF FIL
WHERE MAIN.GPNO='TYLIB'
AND MAIN.INVTEXNO=FIL.INVTEXNO
ORDER BY MAIN.INVTEXNO


SELECT	DISTINCT					    
	MAIN.INVTEXNO					AS	AUDITSEQ	--투자심사번호
,	MAIN.GPNO						AS	VCOID --GP번호
,	SUBSTR(MAIN.FCD,LENGTH(MAIN.GPNO), LENGTH(MAIN.FCD))	AS	FTYP	 --펀드계약번호
,	MAIN.CROF_GP_EMPNO				AS	CLIENT			--담당심사역번호
,	MAIN.INVTEX_DT					AS	AUDITDT			--투자심사일자
,	MAIN.INVTEX_TIME					AS	AUDITTIME		--투자심사시간	
,	MAIN.INVTEX_LOC_NM				AS	AUDITPLACE		--투자심사장소명	
,	MAIN.GP_ENT_NO					AS	COID	--GP기업번호
,	MAIN.BIZNO						AS	BUSNO	 --사업자번호
,	MAIN.PRSD_NM					AS	CEONM	--대표자명
,	MAIN.CAPT_AMT					AS	ASSETAMT	--자본금액
,	MAIN.ESTB_DT						AS	FOUNDDT		--설립일자	
,	MAIN.INVTEX_INVT_FLD_TPCD			AS	MAINFIELD		--투심투자분야구분코드
,	MAIN.INVTEX_INVT_FLD_DTL_TPCD		AS	DETAILFIELD		--투심투자분야상세구분코드	
,	MAIN.INVTEX_OBJ_INDS_NM			AS	KIND			--투심대상업종명
,	MAIN.INVTEX_OBJ_ENT_STKH_OTLN	AS	JUJULIST			--투심대상기업주주개요
,	DTL.TOT_INVT_AMT					AS	TOTINVESTAMT	--총투자액
,	DTL.INVT_AMT						AS	STOCKTOTAMT	--주식투자액
,	DTL.FVAL							AS	FACEAMT	--주식액면가
,	DTL.STKS_KND_TPCD				AS	STOCKGBN	--주식종류
,	DTL.CVT_SHR_RT					AS	JIBUNRATE	--지분율
,	DTL.GAIN_STKNUM					AS	GETSTOCKCNT	--취득주수
,	DTL.GAIN_CVT_PRC					AS	STOCKUNITAMT	--주당취득단가
,	''								AS	DECISIONAUTH	--의결권조건 / KIF에 없음
,	''								AS	BONDAMT	--채권투자액  / KIF에 없음
,	''								AS	CONVERTYN	--전환여부
,	''								AS	CONVERTYEAR	--전환기간년수
,	''								AS	FACEINTERESTRATE	--표면이자율
,	''								AS	SECUREINTERESTRATE	--보장이자율
,	''								AS	CONVERTCONDITION	--전환조건
,	''								AS	PROJECTAMT	--프로젝트투자액
,	''								AS	PROJECTTYPE	--프로젝트유형
,	''								AS	PROJECTFROMDT	--프로젝트시작일자
,	''								AS	PROJECTTODT	--프로젝트종료일자
,	''								AS	ETCINVESTAMT	--기타투자액
,	DTL.INVT_KND_OTLN				AS	INVESTTYPE	--투자종류
,	DTL.INVT_COND_OTLN				AS	INVESTCONDITION	--투자조건
,	CASE WHEN FIL.INVTEX_STAT_TPCD='1' AND FILE_SN ='1' AND INVTEX_FILE_TPCD='1'  THEN INVTEX_REL_FNN ELSE '' END	AS	UPFILE	--투심보고서1
,	''								AS	CHGID	--변경아이디
,	''								AS	CHGDT	--변경일자
,	CASE WHEN FIL.INVTEX_STAT_TPCD='1' AND FILE_SN ='2' AND INVTEX_FILE_TPCD='1'  THEN INVTEX_REL_FNN ELSE '' END	AS	UPFILE2	--투심보고서2
,	CASE WHEN FIL.INVTEX_STAT_TPCD='1' AND FILE_SN ='3' AND INVTEX_FILE_TPCD='1' THEN INVTEX_REL_FNN ELSE '' END	AS	UPFILE3	--투심보고서3
,	''								AS	UPFILE4	--투심보고서4
,	''								AS	UPFILE5	--투심보고서5
,	CASE WHEN FIL.INVTEX_STAT_TPCD='1' AND INVTEX_FILE_TPCD='2' THEN INVTEX_REL_FNN ELSE '' END	AS	ATTACH	--준법감시보고서
,	''								AS	PROJECTNM	--프로젝트명
,	MAIN.INVTEX_DAT_ACCP_TPCD			AS	CONFIRMYN	--접수여부
,	''								AS	FACEAMT2	--구주_액면가
,	''								AS	STOCKGBN2	--구주_주식종류
,	''								AS	JIBUNRATE2	--구주_지분율
,	''								AS	STOCKTOTAMT2	--구주_투자금액
,	''								AS	ADMITS1	--구주_인정여부
,	''								AS	GETSTOCKCNT2	--구주_취득주수
,	''								AS	PURPOSE1	--구주_주목적여부
,	''								AS	SPCYN1	--구주_특수목적여부
,	''								AS	STOCKUNITAMT2	--구주_취득단가
,	DTL.RCGT_INVT_TPCD										AS	ADMITS	--신주_인정여부
,	''								AS	ADMITS2	--
,	''								AS	ADMITS3	--프로젝트_인정여부
,	CASE WHEN DTL.MAIN_PUPS_INVT_YN='Y' THEN '1' ELSE '0'	END		AS	PURPOSE	--신주_주목적여부
,	''								AS	PURPOSE2	--
,	''								AS	PURPOSE3	--프로젝트_주목적여부
,	CASE WHEN DTL.SCLA_PUPS_INVT_YN='Y' THEN '1' 
			WHEN DTL.SCLA_PUPS_INVT_YN='N' THEN '2'
			WHEN DTL.SCLA_PUPS_INVT_YN='Z' THEN '3'		ELSE ''	END	AS	SPCYN	--신주_특수목적여부
,	''														AS	SPCYN2	--
,	''														AS	SPCYN3	--프로젝트_특수목적여부
,	''														AS	BONDGBN	--
,	''														AS	MAINFIELD4	--
,	''														AS	CONVERTAMT	--
,	''														AS	CONVERTRATE	--
,	DTL.CHG_DT												AS	MODIFYDT	--수정일자
,	CASE WHEN DTL.MNG_RWD_OBJ_YN='Y' THEN '1' ELSE '0'	END		AS	MFYN	--신주_관리보수여부
,	''														AS	MFYN1	--구주_관리보수여부
,	''														AS	MFYN2	--
,	''														AS	MFYN3	--프로젝트_관리보수여부
,	''														AS	USEPURPOSE1	--구주_투자금사용목적
,	''														AS	USEPURPOSE2	--
,	''														AS	USEPURPOSE3	--프로젝트_투자금사용목적
,	''														USEPURPOSEYN1	--구주_투자금사용목적여부
,	''														USEPURPOSEYN2	--
,	''														USEPURPOSEYN3	--프로젝트_투자금사용목적여부
,	''														RESTRAINTYN1	--구주_제재방안
,	''														RESTRAINTYN2	--
,	''														RESTRAINTYN3	--프로젝트_제재방안
,	''														RECOGNIZEYN1	--구주_대상거래인지방안
,	''														RECOGNIZEYN2	--
,	''														RECOGNIZEYN3	--프로젝트_대상거래인지방안
,	''														STEPYN1	--구주_처리방안
,	''														STEPYN2	--
,	''														STEPYN3	--프로젝트_처리방안
,	''														USEDTYN1	--구주_투자금실사시기
,	''														USEDTYN2	--
,	''														USEDTYN3	--프로젝트_투자금실사시기
,	CASE WHEN DTL.INVAT_USE_PUPS_OTLN='해당없음' THEN '' ELSE DTL.INVAT_USE_PUPS_OTLN	END				AS	USEPURPOSE			--신주_투자금사용목적
,	CASE WHEN DTL.INVAT_USE_PUPS_YN='Y' THEN '1' ELSE '0'	END				AS	USEPURPOSEYN		--신주_투자금사용목적여부
,	CASE WHEN DTL.VIOL_PNSH_PLN_YN='Y' THEN '1' ELSE '0'	END				AS	RESTRAINTYN			--신주_제재방안
,	CASE WHEN DTL.OBJ_TRD_RCGN_PLN_YN='Y' THEN '1' 
			WHEN DTL.OBJ_TRD_RCGN_PLN_YN='N' THEN '2'
			WHEN DTL.OBJ_TRD_RCGN_PLN_YN='Z' THEN '3'		ELSE ''	END		AS	RECOGNIZEYN			--신주_대상거래인지방안
,	CASE WHEN DTL.OBJ_TRD_OCUR_PROC_PLN_YN='Y' THEN '1' ELSE '0'	END			AS	STEPYN				--신주_처리방안
,	CASE WHEN DTL.INVAT_ACIN_PFTM_YN='Y' THEN '1' 
			WHEN DTL.INVAT_ACIN_PFTM_YN='N' THEN '2'
			WHEN DTL.INVAT_ACIN_PFTM_YN='Z' THEN '3'		ELSE ''	END		AS	USEDTYN				--신주_투자금실사시기
,	''																	AS	NOGBN				--
,	''																	AS	BONDAMT1			--CB_투자금액
,	''																	AS	BONDAMT2			--BW_투자금액
,	''																	AS	MFYN21				--CB_관리보수여부
,	''																	AS	MFYN22				--BW_관리보수여부
,	''																	AS	CONVERTAMT21		--CB_전환금액
,	''																	AS	CONVERTAMT22		--BW_전환금액
,	''																	AS	ADMITS21			--CB_인정여부
,	''																	AS	ADMITS22			--BW_인정여부
,	''																	AS	PURPOSE21		--CB_주목적여부
,	''																	AS	PURPOSE22		--BW_주목적여부
,	''																	AS	SPCYN21			--CB_특수목적여부
,	''																	AS	SPCYN22				--BW_특수목적여부
,	''																	AS	CONVERTRATE21	--CB_전환지분율
,	''																	AS	CONVERTRATE22	--BW_전환지분율
,	''																	AS	USEPURPOSE21	--CB_투자금사용목적
,	''																	AS	USEPURPOSE22	--BW_투자금사용목적
,	''																	AS	USEPURPOSEYN21	--CB_투자금사용목적여부
,	''																	AS	USEPURPOSEYN22	--BW_투자금사용목적여부
,	''																	AS	RESTRAINTYN21	--CB_제재방안
,	''																	AS	RESTRAINTYN22	--BW_제재방안
,	''																	AS	RECOGNIZEYN21	--CB_대상거래인지방안
,	''																	AS	RECOGNIZEYN22	--BW_대상거래인지방안
,	''																	AS	STEPYN21				--CB_처리방안
,	''																	AS	STEPYN22			--BW_처리방안
,	''																	AS	USEDTYN21		--CB_투자금실사시기
,	''																	AS	USEDTYN22		--BW_투자금실사시기
,	CASE WHEN DTL.INVAT_USE_PUPS_YN='Y' THEN '1' ELSE '0'	END					AS	USEINPUTYN		--투자금사용목적기재여부
,	''																	AS	USEINPUTYN1		--투자금사용목적기재여부
,	''																	AS	USEINPUTYN21		--투자금사용목적기재여부
,	''																	AS	USEINPUTYN22		--투자금사용목적기재여부
,	''																	AS	USEINPUTYN3		--투자금사용목적기재여부
,	''																	AS	FUNDCODE		--
,	''																	AS	AFFICHK			--
 ,	MAIN.LP_SHR_AMT														AS	KIF_CNT_AMT		 --	KIF부담금
 ,	 ''																	AS	INT_AMTUS_PUP		 --	투자금사용목적
 ,	DTL.IPTN_INVT_YN														AS	IMT_FINT_PTCD1		 --	중점투자여부코드(신주)
 ,	 ''																	AS	IMT_FINT_PTCD2		 --	중점투자여부코드(구주)
 ,	 ''																	AS	IMT_FINT_PTCD3		 --	중점투자여부코드(CB)
 ,	 ''																	AS	IMT_FINT_PTCD4		 --	중점투자여부코드(BW)
 ,	 ''																	AS	IMT_FINT_PTCD5		 --	중점투자여부코드(프로젝트)
 ,	MAIN.INVT_FLD_CRPD_TPCD												AS	INVT_FLD_CRPD_TPCD		 --	투자분야해당구분코드
 ,	MAIN.MNS_VNTR_ENT_YN													AS	MNS_VNTR_ENT_YN		 --	중소벤처기업여부
 ,	MAIN.CMBT_BTW_TRD_YN												AS	CMBT_BTW_TRD_YN		 --	조합간거래여부
 ,	MAIN.FRGN_INVT_YN													AS	FRGN_INVT_YN		 --	해외투자여부
 ,	MAIN.POST_INVT_YN													AS	POST_INVT_YN		 --	후행투자여부
 ,	MAIN.INVT_LMT_YN														AS	INVT_LMT_YN		 --	투자한도여부
 ,	MAIN.INVT_TERM_YN													AS	INVT_TERM_YN		 --	투자기간여부
 ,	MAIN.OLST_INVT_LMT_YN												AS	OLST_INVT_LMT_YN		 --	구주투자한도여부
 ,	MAIN.LIST_STKS_YN														AS	LIST_STKS_YN		 --	상장주식여부
   ,	 ''																	AS	PDCO_NM
  ,	 ''																	AS	PDCO_CEONM
  ,	 ''																	AS	PDCO_CAPT_AMT
  ,	 ''																	AS	PDCO_ESTB_DT
  ,	 ''																	AS	PDCO_BUSNO
  ,	 ''																	AS	PURPOSE_S
  ,	 ''																	AS	PURPOSE_S1
  ,	 ''																	AS	PURPOSE_S21
 ,	 ''																	AS	 PURPOSE_S22
 ,	 ''																	AS	 PURPOSE_S3
 ,	 ''																	AS	 PURPOSE_T
 ,	 ''																	AS	 PURPOSE_T1
 ,	 ''																	AS	PURPOSE_T21
 ,	 ''																	AS	PURPOSE_T22
 ,	 ''																	AS	PURPOSE_T3
 ,	 ''																	AS	SPCYN_S
 ,	 ''																	AS	SPCYN_S1
 ,	 ''																	AS	SPCYN_S21
 ,	 ''																	AS	SPCYN_S22
 ,	 ''																	AS	SPCYN_S3
 ,	 ''																	AS	SPCYN_T
 ,	 ''																	AS	SPCYN_T1
 ,	 ''																	AS	SPCYN_T21
 ,	 ''																	AS	SPCYN_T22
 ,	 ''																	AS	SPCYN_T3
FROM  INVTEX_INFO MAIN  , INVTEX_DTL_INFO DTL ,INVTEX_FILE_PTCL FIL
WHERE MAIN.GPNO='TYLIB'
AND  DTL.INVTEX_STAT_TPCD = '1' --투심예정 MST
AND	DTL.INVTEX_TYPE_TPCD ='SN' -- SN,SO,CB,BW,PJ 
AND	MAIN.INVTEXNO=DTL.INVTEXNO
AND	MAIN.INVTEXNO=FIL.INVTEXNO
ORDER BY MAIN.INVTEXNO

SELECT * FROM VCRPT.KIF_CF001PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_CMBTMB_DTL WHERE MNGSYSNO='TYLIB'

SELECT * FROM VCRPT.KIF_CMBTMB_FILE_PTCL WHERE MNGSYSNO='TYLIB'

SELECT * FROM VCRPT.KIF_CMBTMB_MEMO_PTCL WHERE MNGSYSNO='TYLIB'

SELECT * FROM VCRPT.KIF_CMBTMB_MST WHERE MNGSYSNO='TYLIB'

SELECT * FROM VCRPT.KIF_CODETAIL WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_CODTBLPF WHERE VCOID='TYILB'

SELECT * FROM VCRPT.KIF_SFUND_TRD WHERE MNGSYSNO='TYLIB' 

SELECT * FROM VCRPT.KIF_FCNTR_OCS_APNX_PTCL_FILE WHERE MNGSYSNO='TYLIB'

SELECT * FROM VCRPT.KIF_FCNTR_RPT_APNX_PTCL WHERE MNGSYSNO='TYLIB'

SELECT * FROM VCRPT.KIF_FD002PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_FD003PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_IN001PF WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_INVDIVPLAN WHERE VCOID='TYLIB'

SELECT * FROM VCRPT.KIF_INVFUNDINFO WHERE VCOID='TYLIB'

--마스터INVMNGMST
SELECT    A.SFCD              AS FUNDCD
          ,'A1'               AS INVGBN
          ,B.TRD_DT           AS INVDT  
--          , CASE WHEN B.MFUND_YN ='Y' THEN SUM(B.TRD_AMT) END         AS INVAMT
          ,SUM(B.TRD_AMT)     AS INVAMT  
          ,B.FST_REG_EMPNO AS CHGID
          ,B.FST_REGDTM AS CHGDT
          ,B.TRD_DT           AS REGISTDT
FROM SFUND@KIF A, FUND_IVSM_TRD@KIF B
WHERE A.GPNO='TYLIB'
AND   A.FCD = B.FCD AND B.MFUND_YN='Y'
GROUP BY A.SFCD, B.TRD_DT, B.MFUND_YN,B.FST_REG_EMPNO,B.FST_REGDTM
ORDER BY A.SFCD



--디테일INVMNGDTL
SELECT    A.SFCD              AS FUNDCD
          ,B.TRD_DT           AS INVDT  
          ,B.GPMBNO           AS JCODE
          ,B.TRD_AMT          AS INVAMT
          ,''                 AS BIGO
          ,FST_REG_EMPNO      AS CHGID
          ,FST_REGDTM         AS CHGDT 
FROM SFUND@KIF A, FUND_IVSM_TRD@KIF B
WHERE A.GPNO='TYLIB'
AND   A.FCD = B.FCD
ORDER BY A.SFCD

