How to do an INNER JOIN in SSIS Excel Source component

前端 未结 2 1262
闹比i
闹比i 2021-01-27 18:07
SELECT   [Sheet1$].ID,
CLng([Sheet1$].RecordID) AS RecordID, 
[Sheet1$].col1, 
[Sheet1$].col2, 
[Sheet1$].col3, 
[Sheet1$].col4, 
[Sheet1$].col5,
[Sheet2$].Name
FROM             


        
2条回答
  •  爱一瞬间的悲伤
    2021-01-27 19:07

    Lets try to cheat:

    SELECT  
        CLng(x.RecordID) AS RecordID, 
        x.col1, 
        x.col2, 
        x.col3, 
        x.col4, 
        x.col5,
        x.Name
        FROM (
        SELECT
        [Sheet1$].RecordID, 
        [Sheet1$].col1, 
        [Sheet1$].col2, 
        [Sheet1$].col3, 
        [Sheet1$].col4, 
        [Sheet1$].col5,
        [Sheet2$].Name    
        FROM [Sheet1$]
        INNER JOIN [Sheet2$] ON 
        [Sheet1$].RecordID = [Sheet2$].RecordID
    ) as x
        INNER JOIN [Sheet3$] ON 
        x.RecordID = [Sheet3$].RecordID
    

提交回复
热议问题