 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: When using IfNull in my SQL, records are ignored</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/when-using-ifnull-in-my-sql-records-are-ignored/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/when-using-ifnull-in-my-sql-records-are-ignored/</link>
	<description></description>
	<lastBuildDate>Sat, 25 May 2013 05:16:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-using-ifnull-in-my-sql-records-are-ignored/#comment-85773</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Fri, 24 Dec 2010 03:15:03 +0000</pubDate>
		<guid isPermaLink="false">#comment-85773</guid>
		<description><![CDATA[&lt;i&gt;If I go straight to STRSQL and run it, it&#039;s fine.&lt;/i&gt;

Note that you can&#039;t run the same SQL in STRSQL. In your embedded SQL, you are creating a CURSOR and then FETCHing into host (program) variables. This is a distinctly different process and requires different analysis.

You can test general query structures with STRSQL. But &quot;host variable&quot; procedures are basically guesswork as far as STRSQL is concerned.

Tom]]></description>
		<content:encoded><![CDATA[<p><i>If I go straight to STRSQL and run it, it&#8217;s fine.</i></p>
<p>Note that you can&#8217;t run the same SQL in STRSQL. In your embedded SQL, you are creating a CURSOR and then FETCHing into host (program) variables. This is a distinctly different process and requires different analysis.</p>
<p>You can test general query structures with STRSQL. But &#8220;host variable&#8221; procedures are basically guesswork as far as STRSQL is concerned.</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ddaswani</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-using-ifnull-in-my-sql-records-are-ignored/#comment-85653</link>
		<dc:creator>Ddaswani</dc:creator>
		<pubDate>Tue, 21 Dec 2010 17:29:19 +0000</pubDate>
		<guid isPermaLink="false">#comment-85653</guid>
		<description><![CDATA[check ur SQLCODE...

IF its negitive eg -504 means ur getting null values in field while fetching]]></description>
		<content:encoded><![CDATA[<p>check ur SQLCODE&#8230;</p>
<p>IF its negitive eg -504 means ur getting null values in field while fetching</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-using-ifnull-in-my-sql-records-are-ignored/#comment-85553</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Sat, 18 Dec 2010 02:13:24 +0000</pubDate>
		<guid isPermaLink="false">#comment-85553</guid>
		<description><![CDATA[You might also want to try bringing a null indicator in when you FETCH the column:&lt;pre&gt;
C/Exec sql 
C+ FETCH C1 
C+ INTO :xaccountID,:xaddress :xaddrind
C/End-Exec &lt;/pre&gt;
Does it &quot;skip&quot; rows or does it end after retrieving four rows? That is, is the fifth row the first one with a null address?

Tom]]></description>
		<content:encoded><![CDATA[<p>You might also want to try bringing a null indicator in when you FETCH the column:
<pre>
C/Exec sql 
C+ FETCH C1 
C+ INTO <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> accountID,:xaddress <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> addrind
C/End-Exec </pre>
<p>Does it &#8220;skip&#8221; rows or does it end after retrieving four rows? That is, is the fifth row the first one with a null address?</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: philpl1jb</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/when-using-ifnull-in-my-sql-records-are-ignored/#comment-85550</link>
		<dc:creator>philpl1jb</dc:creator>
		<pubDate>Sat, 18 Dec 2010 00:56:45 +0000</pubDate>
		<guid isPermaLink="false">#comment-85550</guid>
		<description><![CDATA[It might be your SQLCOD .. 100 is no data found.  You will want to find out what value you are actually getting.

•If SQLCODE = 0 and SQLWARN0 is blank, execution was successful.
•If SQLCODE = 100, no data was found. For example, a FETCH statement returned no data, because the cursor was positioned after the last row of the result table.
•If SQLCODE &gt; 0 and not = 100, execution was successful with a warning.
•If SQLCODE = 0 and SQLWARN0 = &#039;W&#039;, execution was successful with a warning.
•If SQLCODE &lt; 0, execution was not successful.

and :xaccountID,:xaddress           must be correct types for  accountID,  and address
Phil]]></description>
		<content:encoded><![CDATA[<p>It might be your SQLCOD .. 100 is no data found.  You will want to find out what value you are actually getting.</p>
<p>•If SQLCODE = 0 and SQLWARN0 is blank, execution was successful.<br />
•If SQLCODE = 100, no data was found. For example, a FETCH statement returned no data, because the cursor was positioned after the last row of the result table.<br />
•If SQLCODE &gt; 0 and not = 100, execution was successful with a warning.<br />
•If SQLCODE = 0 and SQLWARN0 = &#8216;W&#8217;, execution was successful with a warning.<br />
•If SQLCODE &lt; 0, execution was not successful.</p>
<p>and <img src='http://itknowledgeexchange.techtarget.com/itanswers/wp-includes/images/smilies/icon_mad.gif' alt=':x' class='wp-smiley' /> accountID,:xaddress           must be correct types for  accountID,  and address<br />
Phil</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 3/8 queries in 0.036 seconds using memcached
Object Caching 323/324 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-25 06:46:16 -->