These are the queries:
with t1(EML) as
-- Bad comment '' (with unbalanced quote)
( values 'a@b.c', 'd@e.f', 'f@h.i', 'j@k.l') select * from t1 where EML like '%@h.i';
with t1(EML) as
-- Bad comment ' (with unbalanced quote)
( values 'a@b.c', 'd@e.f', 'f@h.i', 'j@k.l') select * from t1 where EML like '%@h.i';
__
The only difference is the additional single quote in the comment
Using Toad for DB2, connected to any server, and executing these queries one by one in the Editor window, one may see that the first query, the one with the pair of quote-marks, returns one row, and, the second query, the one with only one single quote-mark in the comment area, returns no rows.
So, when there are unpaired quote-marks in a comment within the query, the result set is empty / incorrect.
é necessário estar conectado e ter um contrato de manutenção atual para visualizar os artigos de conhecimento premium.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center