November 1, 2011 at 3:04 pm
Hi I was trying to CAST the DT_WSTR to Integer and i was getting the error in expression Block can some one help me with my expression? Thanks in advance
My Expression :
(DT_I4)@V_Version >=10
Error Message :
TITLE: Microsoft Visual Studio
------------------------------
Error at Constraint: Error code 0x80020005 occurred attempting to convert from data type DT_WSTR to data type DT_I4.
Error at Constraint: Casting expression "@V_Version" from data type "DT_WSTR" to data type "DT_I4" failed with error code 0xC00470C2.
------------------------------
BUTTONS:
OK
------------------------------
November 2, 2011 at 1:17 am
Are you sure all values of the V_Version column can be converted to integers?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
November 2, 2011 at 4:44 am
Use a data viewer and make sure that all the values of V_Version is eligible to be converted to integer 🙂
November 2, 2011 at 6:01 am
obviously there's a case which cannot be converted to integer, use the following query to detect the anomaly:
Select *
From TableName
Where IsNumeric(ColumnName) = 0
November 2, 2011 at 8:16 am
i was using the below query in oracle and was storing it in variable and i tried to save it a int32 but it was not allowing me to do that ,so i was storing that variable as an object and was using the expression to compare and i was not getting the result as desired..can some one help me my expression ..thanks in advance
My Query in Oracle database::
Select CAST(substr(i.version,1,Instr(i.version,'.')-1) AS Numeric) AS Version from v$instance i
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply