次の手順を作成していますが、実行すると以下のエラーが発生します
クライアントのレンダリング中にエラーが発生しました。
レポートの処理中にエラーが発生しました。
データセット dsCitiDriverStats の次のデータ行を読み取ることができません。nvarchar 値 'Swedish' をデータ型 int に変換するときに変換に失敗しました。
ストアド プロシージャのソース コードは次のとおりです。
Create PROCEDURE [dbo].[usp_DWReport_CITICallDrivers_Test1]
@pTransactionsCreatedFrom DATETIME,
@pTransactionsCreatedTo DATETIME,
@pCallerType NVARCHAR(4000),
@pCompany NVARCHAR(4000)
AS
BEGIN
SET NOCOUNT ON;
SET DATEFIRST 1;
DECLARE @ComCount int
SET @ComCount = ( SELECT CAST(LEN(@pCompany) AS int) )
print @ComCount
IF @ComCount < 4000
BEGIN
SELECT en.ENQ_CREATION_DT AS [Date] ,
DATEPART(dw, en.ENQ_CREATION_DT) AS WeekDayNo,
en.ENQ_SOURCE AS CallType,
CASE enq_caller_type
WHEN '1389' THEN '3rd'
WHEN '1390' THEN 'CAS'
WHEN '1391' THEN 'CH'
WHEN '1392' THEN 'PA'
ELSE NULL
END AS CallerType,
RIGHT(en.ENQ_CC_NUMBER, 6) AS Last6DigitsOfCardNo,
en.ENQ_CUSTOMER_NAME AS CustomerName,
en.ENQ_COMPANY_NAME AS CustomerCompany,
a.ACCNT_CON_FST_NAME AS LineOfBusiness,
en.ENQ_ECOUNT_ID AS EcountID,
lov.Value1 AS [Language],
en.ENQ_OUTCOME AS ClassificationOfTheCall,
en.ENQ_COMMENTS_LONG AS Comments,
en.ENQ_CREATOR_LOGIN AS AgentInitials,
CASE en.ENQ_CUSTOM_CHK1
WHEN 1 THEN 'Yes'
WHEN 0 THEN 'No'
ELSE NULL
END AS VIP
FROM ENQUIRY en
JOIN ACCOUNTS a ON a.ACCNT_ID = en.ENQ_ACCNT_CSN
JOIN DW_Admin.dw_hold_listofvalue lov ON en.ENQ_LANGUAGE = lov.ID
WHERE en.ENQ_CREATION_DT >= @pTransactionsCreatedFrom
AND en.ENQ_CREATION_DT < DATEADD(dd, DATEDIFF(dd, 0, @pTransactionsCreatedTo) + 1, 0)
AND a.ACCNT_CON_FST_NAME IN ( SELECT s.Item FROM dbo.Split( @pCallerType , ',' ) s )
AND en.ENQ_COMPANY_NAME IN ( SELECT s.Item FROM dbo.Split( @pCompany , ',' ) s )
END
ELSE
BEGIN
print 'more than 4K'
SELECT en.ENQ_CREATION_DT AS [Date],
DATEPART(dw, en.ENQ_CREATION_DT) AS WeekDayNo,
en.ENQ_SOURCE AS CallType,
CASE enq_caller_type
WHEN '1389' THEN '3rd'
WHEN '1390' THEN 'CAS'
WHEN '1391' THEN 'CH'
WHEN '1392' THEN 'PA'
ELSE NULL
END AS CallerType,
RIGHT(en.ENQ_CC_NUMBER, 6) AS Last6DigitsOfCardNo,
en.ENQ_CUSTOMER_NAME AS CustomerName,
en.ENQ_COMPANY_NAME AS CustomerCompany,
a.ACCNT_CON_FST_NAME AS LineOfBusiness,
en.ENQ_ECOUNT_ID AS EcountID,
lov.Value1 AS [Language],
en.ENQ_OUTCOME AS ClassificationOfTheCall,
en.ENQ_COMMENTS_LONG AS Comments,
en.ENQ_CREATOR_LOGIN AS AgentInitials,
CASE en.ENQ_CUSTOM_CHK1
WHEN 1 THEN 'Yes'
WHEN 0 THEN 'No'
ELSE NULL
END AS VIP
FROM ENQUIRY en
JOIN ACCOUNTS a ON a.ACCNT_ID = en.ENQ_ACCNT_CSN
JOIN DW_Admin.dw_hold_listofvalue lov ON en.ENQ_LANGUAGE = lov.ID
WHERE en.ENQ_CREATION_DT >= @pTransactionsCreatedFrom
AND en.ENQ_CREATION_DT < DATEADD(dd, DATEDIFF(dd, 0, @pTransactionsCreatedTo) + 1, 0)
AND a.ACCNT_CON_FST_NAME IN ( SELECT s.Item FROM dbo.Split( @pCallerType , ',' ) s)
AND en.ENQ_COMPANY_NAME IN ( SELECT DISTINCT
COMP_NAME
FROM COMPANIES
WHERE COMP_STATUS = 'Active'
)
END
RETURN 0
END
お知らせ下さい