本文介绍了使用连接在SQL Server中的ChangeTable条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 这是我正常的连接条件查询 Here is my normal join condition queryselect C.[Search Name],SA.Name,'',SA.Address,SA.[Address 2],'','','',SA.[Post Code]<pre lang="SQL"> from dbo.[CRONUS International Ltd_$Customer] C with (nolock)inner join dbo.[CRONUS International Ltd_$Ship-to Address] SA with (nolock)on C.No_=SA.[Customer No_] 这里我得到的结果..如果我更新上面的两个表 然后我使用CHANGETABLE尝试此查询 Here I Getting result ..If I update above two tablesThen I try this query using "CHANGETABLE"select C.[Search Name],SA.Name,'',SA.Address,SA.[Address 2],'','','',SA.[Post Code],CT. [SYS_CHANGE_VERSION],CT.[SYS_CHANGE_CREATION_VERSION],CT.[SYS_CHANGE_OPERATION],CT.[SYS_CHANGE_COLUMNS],CT.[SYS_CHANGE_CONTEXT]From CHANGETABLE(CHANGES dbo.[CRONUS International Ltd_$Customer], 1) AS CT inner join dbo.[CRONUS International Ltd_$Customer] Cwith (nolock) on ct. No_=c.No_ INNER JOIN dbo.[CRONUS International Ltd_$Ship-to Address] SA with (nolock) on C.No_=SA.[Customer No_] inner joinCHANGETABLE(CHANGES dbo.[CRONUS International Ltd_$Ship-to Address], 1) AS CP on CP.[Customer No_]=SA.[Customer No_] WHERE 1=1 这里我从这个查询中得不到任何结果.. 我怎样才能得到使用条件使用可变条件的结果 请帮助我.. Here I am not getting any result from this query..How can I getting the result using changetable condition using conditionPlease help me..推荐答案 我来这里结果..如果我更新以上两张桌子 然后我用CHANGETABLE尝试这个查询 Here I Getting result ..If I update above two tablesThen I try this query using "CHANGETABLE"select C.[Search Name],SA.Name,'',SA.Address,SA.[Address 2],'','','',SA.[Post Code],CT. [SYS_CHANGE_VERSION],CT.[SYS_CHANGE_CREATION_VERSION],CT.[SYS_CHANGE_OPERATION],CT.[SYS_CHANGE_COLUMNS],CT.[SYS_CHANGE_CONTEXT]From CHANGETABLE(CHANGES dbo.[CRONUS International Ltd_ 这篇关于使用连接在SQL Server中的ChangeTable条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 10-30 03:21