Posted Sat, 16 Mar 2024 10:07:44 GMT by Guido Wieland WIeland Document Solutions & Services GmbH DMS Solution Engineer
Dear Community

I have the following scenario or SQL query in a workflow data assignment:
SELECT [title] FROM [RV - system data] WHERE DW_ID_LONG = GV_Standard_Aufwandkonto_Nr
Variables/types used:

Database field => DW_ID_LONG = Text or NVARCHAR(12)
Global workflow variable => GV_Standard_Aufwandkonto_Nr = Numeric
From an SQL perspective, the following applies in principle:

Generally MSSQL will transfer data from a varchar field to an INT (numeric field) as an implicit conversion - meaning that you do not need to specify a conversion. You will however need to pay careful attention to decimal places if you use an INT (numeric field).
(From <>)
Accordingly, and assuming that the database field DW_ID_LONG only contains integer values in the range of -2147483648 and 2147483648, I believe that in the case of a pure WHERE comparison, no explicit data type conversion (e.g. using CAST (DW_ID_LONG as INT)) is necessary and the two variables can be compared directly with each other despite natively different data types.

Basically, the whole thing seems to work, but due to internal discussions with colleagues, opinions differ and I would like to ask for opinions and/or experiences from the community.

Best regards
Posted Mon, 18 Mar 2024 09:26:37 GMT by Simon H. Hellmann Toshiba Tec Germany Imaging Systems GmbH IT-Consultant Document Management Solutions
Hello Guido Wieland,

just to be safe I would always use explicit conversion everywhere I can.
In my experience, vendors tend to change standards on implicit conversion sometimes which in turn might break your workflow.

Greetings from Germany,
Simon H. Hellmann
DocuWare System Consultant
Posted Mon, 18 Mar 2024 16:35:16 GMT by Guido Wieland WIeland Document Solutions & Services GmbH DMS Solution Engineer

Hi Simon,

Thanks for your feedback and yes, sure I get your drift for that matter.

To cover for mentioned eventualities it would definitely be advised to go for an explizit CAST or CONVERT.

Nevertheless, presuming mentioned implicit conversion is and remains supported by vendor, in such case the outlined example would indeed work just fine as long as DW_ID_LONG contains only integer values, correct?

Best regards


You must be signed in to post in this forum.