<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>Yeah your right Alban, that looks bad, but it was an artifact of
'try-this, try-this, no, try-this'.<br>
<br>
The table is empty, and unfortunately remains that way; nothing gets
inserted.<br>
I tried other variations, however FOUND just isn't behaving as I would
think.<br>
<br>
-----------------------------------------------<br>
OUTPUT SNIPPET:<br>
NOTICE: SQL cmd is = SELECT COUNT(*) FROM zbus_tokens WHERE token =
PARKING<br>
NOTICE: Row = 10, Skipped INSERT Count = 32, Word2 = PARING<br>
NOTICE: SQL cmd is = SELECT COUNT(*) FROM zbus_tokens WHERE token =
COLLEEN<br>
NOTICE: Row = 11, Skipped INSERT Count = 33, Word2 = COLLEEN<br>
<br>
</tt><tt>-----------------------------------------------</tt><br>
<tt> Alban Hertroys wrote:</tt><br>
<tt> On 9 Nov 2010, at 5:11, Ralph Smith wrote:</tt><br>
<tt></tt><br>
<!----><tt> Why is FOUND 'finding' and hence avoiding an INSERT?<br>
<br>
Not really sure what your point is (don't have time to look
closely), but...<br>
<br>
PERFORM Rnotice1(1,''SQL cmd is'',''SELECT COUNT(*) FROM
zbus_tokens WHERE token = ''||Word2::varchar) ;</tt><br>
<tt> PERFORM (SELECT COUNT(*) FROM zbus_tokens WHERE token =
Word2) ;</tt><br>
<tt> IF NOT FOUND THEN</tt><br>
<tt> PERFORM RNotice1(1,''value'',Word2) ;</tt><br>
<tt> INSERT INTO zbus_tokens (token) values(Word2); </tt><br>
<tt> J=J+1 ;</tt><br>
<tt> IF J % 100 = 0 THEN</tt><br>
<tt> PERFORM Rnotice2(1,''Row'',I,''Insert Count'',J) ;</tt><br>
<tt> END IF ;</tt><br>
<tt> ELSE</tt><br>
<tt> K=K+1 ;</tt><br>
<tt> PERFORM RNotice2(1,''Row'',I,''Skipped INSERT Count'',K) ;</tt><br>
<tt> END IF ;<br>
You just connected this ELSE block to the IF statement it was nested
inside.<br>
You probably need to comment out the rest of this ELSE block as well.<br>
<br>
<br>
</tt><tt> Alban Hertroys<br>
<br>
</tt><tt>--<br>
</tt><tt>Screwing up is an excellent way to attach something to the
ceiling.<br>
(Assuming you're not turning the screw driver the wrong way.)<br>
<br>
</tt><tt><br>
-- <br>
Ralph<br>
_________________________</tt>
</body>
</html>