2

以下脚本在 SQL 中正确显示,但在 Excel 2010 中使用 From Other Sources 后,Detail_Desc 字段为空。

有任何想法吗?

SELECT    
  "CUST_1Mth_Composite$".DealerCode,  
  "CUST_1Mth_Composite$".Ratio_ID,  
  CUST_RatioID.Detail_Desc,  
  "CUST_1Mth_Composite$".LineNr,  
  "CUST_1Mth_Composite$".Dealer_RatioID,  
  "CUST_1Mth_Composite$"."201301",  
  COMP_DealerDetails.DlrCode  
FROM  
  COMP_CUST.dbo."CUST_1Mth_Composite$"  
  "CUST_1Mth_Composite$",  
  COMP_CUST.dbo.CUST_RatioID CUST_RatioID,
  COMP_CUST.dbo.COMP_DealerDetails COMP_DealerDetails  
WHERE  
  "CUST_1Mth_Composite$".DealerCode = COMP_DealerDetails.DlrCode
AND
  "CUST_1Mth_Composite$".Ratio_ID = CUST_RatioID.Ratio 
4

1 回答 1

3

试试看,

SELECT CAST(CUST_RatioID.Detail_Des AS varchar(8000)) AS Details_Des

备注:声明为 VARCHAR(MAX) 的列不适用于 Excel。

有关问题的详细信息,请通过此链接

于 2013-10-11T13:15:24.480 回答