Error Message
Completed
I am using this in a Calculated field.
Cast("VW_SYS_PACKAGE"."weight" as INT) and I get this error message. (ERROR: invalid input syntax for type integer: "3.00"). What does this mean.
Hello Byron,
My name is Deepak Chaganti from the Yellowfin Technical Support Team. We have received your support request, and I will be your primary contact on the following ticket:
Ticket Number: #32298
Case Title: Syntax error message when using cast function in calc field.
The error indicates that "3.00"—the value you are attempting to convert—is not in a format that can be converted straight to an integer type.
It looks like a float value. I think that the INT (integer) type does not accept fractions or decimals; it only accepts whole values.
Request for Additional Information:
To better understand and expedite the resolution of your case, please provide me following details:
https://community.yellowfinbi.com/topic/how-to-get-the-info-jsp
Sincerely,
Deepak Chaganti
Yellowfin Technical Support Engineer
Hello Byron,
My name is Deepak Chaganti from the Yellowfin Technical Support Team. We have received your support request, and I will be your primary contact on the following ticket:
Ticket Number: #32298
Case Title: Syntax error message when using cast function in calc field.
The error indicates that "3.00"—the value you are attempting to convert—is not in a format that can be converted straight to an integer type.
It looks like a float value. I think that the INT (integer) type does not accept fractions or decimals; it only accepts whole values.
Request for Additional Information:
To better understand and expedite the resolution of your case, please provide me following details:
https://community.yellowfinbi.com/topic/how-to-get-the-info-jsp
Sincerely,
Deepak Chaganti
Yellowfin Technical Support Engineer
Can CAST or CONVERT BE USED in a calculated field in Freehand SQL? If either can be used like this please provide the syntax. The field name is ("VW_SYS_CASE"."case_number")), "VW_SYS_PACKAGE"."weight")
Something like this but this gives an error message even though the builder says it is valid?
I also tried using the Advanced Function / Data Conversion / Text to Numeric but that did not work either.
Can CAST or CONVERT BE USED in a calculated field in Freehand SQL? If either can be used like this please provide the syntax. The field name is ("VW_SYS_CASE"."case_number")), "VW_SYS_PACKAGE"."weight")
Something like this but this gives an error message even though the builder says it is valid?
I also tried using the Advanced Function / Data Conversion / Text to Numeric but that did not work either.
Hi Byron,
Could you please share the following details:
1. The data type of "VW_SYS_PACKAGE"."weight" in both database and also in YF.
2. If you can also let me know the db you are using (Example: SQL server, Mysql etc) I will try to create a datasource on same db with a field similar to "VW_SYS_PACKAGE"."weight".
3. info.jsp of the environment.
Usually we would perform the conversions at view level but not in calc field:
I have tried converting a simple numeric to varchar in freehand sql and it seems to be working:
Thanks,
Deepak
Hi Byron,
Could you please share the following details:
1. The data type of "VW_SYS_PACKAGE"."weight" in both database and also in YF.
2. If you can also let me know the db you are using (Example: SQL server, Mysql etc) I will try to create a datasource on same db with a field similar to "VW_SYS_PACKAGE"."weight".
3. info.jsp of the environment.
Usually we would perform the conversions at view level but not in calc field:
I have tried converting a simple numeric to varchar in freehand sql and it seems to be working:
Thanks,
Deepak
Great this works. thanks again. You can close this request
Great this works. thanks again. You can close this request
Hi Byron,
Thanks for letting me know.
I am glad that I was able to assist. I will now mark this as completed.
Regards,
Deepak
Hi Byron,
Thanks for letting me know.
I am glad that I was able to assist. I will now mark this as completed.
Regards,
Deepak
Replies have been locked on this page!