 <p>You can skip it with <code>case ... when ... else</code> like you figured out by yourself:</p> <pre><code>... ||case when A.NEXTQUESTIONID is not null then 'NextQuestionID = '||A.NEXTQUESTIONID||',' else '' end || ... </code></pre> <p>You can also use the <code>nvl2</code> function for a shorter solution:</p> <pre><code>... || nvl2(A.NEXTQUESTIONID, 'NextQuestionID = '||A.NEXTQUESTIONID||',', '') || ... </code></pre>