User Tools

Site Tools


transformations:updatedb

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
transformations:updatedb [2021/07/27 01:23] craigttransformations:updatedb [2022/11/12 05:56] – [Remarks] dmitry
Line 30: Line 30:
 \\  \\ 
 =====Remarks===== =====Remarks=====
 +====Matching====
 Note that each combination of values in matched key columns in EasyMorph must be unique, and correspond to only one row, in order to avoid ambiguity. Note that each combination of values in matched key columns in EasyMorph must be unique, and correspond to only one row, in order to avoid ambiguity.
  
Line 43: Line 44:
 |S  |Also single  | |S  |Also single  |
  
-\\ \\ +\\
 It’s also possible to not specify matching key fields at all. In this case, the EasyMorph dataset must have only one row and the underlying SQL UPDATE statement will look as follows: It’s also possible to not specify matching key fields at all. In this case, the EasyMorph dataset must have only one row and the underlying SQL UPDATE statement will look as follows:
   UPDATE  db_table_name   UPDATE  db_table_name
Line 50: Line 51:
  
 If no matching fields are specified and the EasyMorph dataset has more than one row, the action will fail. If no matching fields are specified and the EasyMorph dataset has more than one row, the action will fail.
- + 
 +====Matching data types==== 
 +Note that matching number fields with non-integer values is not permitted.  
 + 
 +The reason is that in EasyMorph the Number data type is 128-bit decimal, not integer. Matching non-integer decimals in EasyMorph with floats or decimals with another bit length in the target database can potentially be incorrect due to rounding errors and therefore is not permitted. Typically, matching should be done by primary or foreign key fields (that are text, integer, or GUID) and never by non-integer values such as price or amount. 
 + 
 +Therefore, only these data types can be matched: 
 +  * Text (including alpha-numeric text strings) 
 +  * Integer numbers 
 +  * Dates without the time part 
 +  * GUIDs 
 + 
 +Do not use these data types for matching: 
 +  * Floats or non-integer numbers (such as price or amount) 
 +  * Dates with the time part (such as timestamps)
 \\  \\ 
 =====Examples===== =====Examples=====
transformations/updatedb.txt · Last modified: 2023/10/15 21:05 by craigt

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki