Veröffentlicht Sat, 16 Mar 2024 10:12:09 GMT von 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 (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 <https://support.docuware.com/en-US/forums/help-with-technical-problems/c3e2967b-2d36-ea11-8454-0003ff59ab14>)
 
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
Guido

Veröffentlicht Sun, 24 Mar 2024 00:00:35 GMT von Matthias Wieland Senior Director Support EMEA
Guten Tag Guido Wieland! Leider sieht es so aus, dass die Community diese Frage nicht beantworten kann. Wir haben deshalb eine neue Supportanfrage mit der Nummer SR-225409-W2D3J für Sie eröffnet. Ein Software Support Specialist wird sich direkt bei Ihnen melden, um diese Anfrage zu beantworten. Wir werden die Lösung der Anfrage hier veröffentlichen, sobald diese abgeschlossen ist. Mit freundlichen Grüßen DocuWare Support Team

Sie müssen angemeldet sein um Beiträge in den Foren zu erstellen.