Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add additional 'when' clause in stringColumnTemplate specifying when …
…length of value is 0, then return an empty string. This will protect a restriction put on by the z/OS mainframe on the REPLACE() function. The restriction is that the source string passed to the REPLACE() function must not be an "empty string".
  • Loading branch information
pmarzullo64 committed May 18, 2009
1 parent 529fe93 commit c7d8218
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion symmetric/src/main/resources/dialects/db2-zseries.xml
Expand Up @@ -27,7 +27,7 @@
</property>
<property name="stringColumnTemplate">
<value>
<![CDATA[ case when $(tableAlias)."$(columnName)" is null then '' else '"' || replace(replace($(tableAlias)."$(columnName)",'\','\\'),'"','\"') || '"' end ||','||]]>
<![CDATA[ case when $(tableAlias)."$(columnName)" is null then '' when length($(tableAlias)."$(columnName)") = 0 then '' else '"' || replace(replace($(tableAlias)."$(columnName)",'\','\\'),'"','\"') || '"' end ||','||]]>
</value>
</property>
<property name="clobColumnTemplate">
Expand Down

0 comments on commit c7d8218

Please sign in to comment.