I am baffled at to why the Postgresql position function gives different results for what seems to be a straightforward test.
Here is query #1:
SELECT count(*)
FROM
dnasample D, ibg_studies ST, subjects S
WHERE
D.studyindex=ST.studyindex
AND ST.studyabrv='CONGER'
AND D.subjectidkey=S.id
AND D.projectindex IS NULL
AND POSITION('Previous subjectid:' in D.comment) IS NULL
which returns a result of 246.
Then here is query #2:
SELECT count(*)
FROM
dnasample D, ibg_studies ST, subjects S
WHERE
D.studyindex=ST.studyindex
AND ST.studyabrv='CONGER'
AND D.subjectidkey=S.id
AND D.projectindex IS NULL
AND POSITION('Previous subjectid:' in D.comment)=0
I do not see why these return such different results?
I've tried reading the Postgres documentation to clarify the difference between zero and the null string, but not much luck there yet...
Thanks in advance, --Rick