How to use CAST function to convert data type to "boolean" in TIBCO Data Virtualization?
book
Article ID: KB0074999
calendar_today
Updated On:
Products
Versions
TIBCO Data Virtualization
7.0.6 and higher
Description
While using CAST function to convert "bit" data type to "boolean" in TDV Studio, we may encounter below error message :
Cause: 'Cast function explicit conversion from data type BIT to BOOLEAN is not allowed.
On line 1, column
8. [parser-2909503]'. [parser-2902050]
Cast function explicit conversion from data type BIT to BOOLEAN is not allowed. On line 1, column
8. [parser-2909503] [Log ID: 9e10bc51-b7d9-4ae5-a7b6-c16074d1bf0c]
BOOLEAN complies with ANSI/ISO 2011 (draft), with the exceptions noted in the remarks above. Legacy BOOLEAN support is deprecated as of TDV version 7.0.2.
We can use a configuration parameter to suppress the new, ANSI-compliant behavior and enable legacy BOOLEAN support.
Environment
All supported operating systems.
Resolution
Follow below steps to override standard-compliant BOOLEAN behavior :
1.Select Administration > Configuration from the main Studio menu.
2.Navigate to Server > SQL Engine > SQL Language.
3.Set the parameter "Allow Numeric Boolean Comparisons Assignments" to True.
Note : Restart the TDV Server for the changes to take effect.
Issue/Introduction
This article describes the steps to use CAST function in TDV to convert "bit" data type to "boolean".