There is probably a very simple solution to this, but I've tried every variation I could think of and still not able get rid of the error:
I'm running this via a shell script:
su - myid -c 'db2 -v "EXPORT TO '/tmp/file.out' OF DEL MODIFIED BY COLDEL| select A, B, C FROM mytable where C = '' and ( F = 1 or F = 2 or F = 3 or F = 4 ) "'
And this is the error I am getting:
SQL0104N An unexpected token "= and ( status" was found following "mytable
where C". Expected tokens may include: "<space>". SQLSTATE=42601
Any help would be greatly appreciated