<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Compare 2 records</title>
	<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/</link>
	<description>...I'm still thinking about this "Tagline"...</description>
	<pubDate>Wed, 19 Jun 2013 08:05:12 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Soren</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-218</link>
		<dc:creator>Soren</dc:creator>
		<pubDate>Wed, 12 Oct 2011 23:49:17 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-218</guid>
		<description>http://gotcal.com/index.php/2010/10/how-to-compare-records-in-dynamics-nav/</description>
		<content:encoded><![CDATA[<p><a href="http://gotcal.com/index.php/2010/10/how-to-compare-records-in-dynamics-nav/" rel="nofollow">http://gotcal.com/index.php/2010/10/how-to-compare-records-in-dynamics-nav/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-213</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 10 Oct 2011 16:59:41 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-213</guid>
		<description>And it should of course be a Text1024 variable :-)</description>
		<content:encoded><![CDATA[<p>And it should of course be a Text1024 variable <img src='http://mibuso.com/blogs/belias/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-212</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 10 Oct 2011 16:57:24 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-212</guid>
		<description>I think the fastest generic solution is to add a text250 variable and add these lines in the beginning of the function:

FormattedRecRef := FORMAT(RecRef);
IF STRLEN(FormattedRecRef) &#60; 750 THEN
  EXIT(FormattedRecRef  FORMAT(xRecRef);

And you can improve it even further by adding special rules based on table no. like the one you mention.</description>
		<content:encoded><![CDATA[<p>I think the fastest generic solution is to add a text250 variable and add these lines in the beginning of the function:</p>
<p>FormattedRecRef := FORMAT(RecRef);<br />
IF STRLEN(FormattedRecRef) &lt; 750 THEN<br />
  EXIT(FormattedRecRef  FORMAT(xRecRef);</p>
<p>And you can improve it even further by adding special rules based on table no. like the one you mention.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mirko</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-211</link>
		<dc:creator>mirko</dc:creator>
		<pubDate>Mon, 10 Oct 2011 16:33:58 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-211</guid>
		<description>In my dreamworld, I'd like to use the same function for everything, but it appears it's not (easily?) possible. For my specific case, performance is VERY important, thus, i'm going to compare some long fields in my table one by one
(if field1 = field2 then...). After that, i'll blank these fields up and "FORMATCompare" the rest of the record variable.
It's a dirty workaround, but i've tested some potential bad performance with the fieldref solution :(</description>
		<content:encoded><![CDATA[<p>In my dreamworld, I&#8217;d like to use the same function for everything, but it appears it&#8217;s not (easily?) possible. For my specific case, performance is VERY important, thus, i&#8217;m going to compare some long fields in my table one by one<br />
(if field1 = field2 then&#8230;). After that, i&#8217;ll blank these fields up and &#8220;FORMATCompare&#8221; the rest of the record variable.<br />
It&#8217;s a dirty workaround, but i&#8217;ve tested some potential bad performance with the fieldref solution <img src='http://mibuso.com/blogs/belias/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-210</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 10 Oct 2011 16:27:15 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-210</guid>
		<description>It looks like you are trying to make a very complex solution to a very simple problem. Why not simply use the simple function from the ChangeLog?
If performance is very important for you, it can be optimize by checking if STRLEN(FORMAT(Rec) &#60; 1024-250. Then your just have to compare FORMAT(Rec) with FORMAT(Rec2). If the string is longer, then it needs to compare it field by field.</description>
		<content:encoded><![CDATA[<p>It looks like you are trying to make a very complex solution to a very simple problem. Why not simply use the simple function from the ChangeLog?<br />
If performance is very important for you, it can be optimize by checking if STRLEN(FORMAT(Rec) &lt; 1024-250. Then your just have to compare FORMAT(Rec) with FORMAT(Rec2). If the string is longer, then it needs to compare it field by field.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mirko</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-209</link>
		<dc:creator>mirko</dc:creator>
		<pubDate>Mon, 10 Oct 2011 15:22:56 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-209</guid>
		<description>I'm gonna try with dotnet interoperability and xmlports...what do you say?
I've never tried to do it, but probably the performance overhead will be even higher than comparing field by field...</description>
		<content:encoded><![CDATA[<p>I&#8217;m gonna try with dotnet interoperability and xmlports&#8230;what do you say?<br />
I&#8217;ve never tried to do it, but probably the performance overhead will be even higher than comparing field by field&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mirko</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-208</link>
		<dc:creator>mirko</dc:creator>
		<pubDate>Mon, 10 Oct 2011 14:58:27 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-208</guid>
		<description>at least, it works for tables smaller than 1024 characters...but for those tables, we can simply format the rec...so, useless function :(</description>
		<content:encoded><![CDATA[<p>at least, it works for tables smaller than 1024 characters&#8230;but for those tables, we can simply format the rec&#8230;so, useless function <img src='http://mibuso.com/blogs/belias/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-207</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Mon, 10 Oct 2011 14:52:29 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-207</guid>
		<description>Yes, the 1024 char limitation in NAV is often a problem :-(

Here the worst part is, that it doesn't fail when doing a FORMAT(rec) - it simply skips the last part of the string and gives a false Ok. But I guess it would be worse if they suddenly made it fail. It is not easy to please everybody :-)</description>
		<content:encoded><![CDATA[<p>Yes, the 1024 char limitation in NAV is often a problem <img src='http://mibuso.com/blogs/belias/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>Here the worst part is, that it doesn&#8217;t fail when doing a FORMAT(rec) - it simply skips the last part of the string and gives a false Ok. But I guess it would be worse if they suddenly made it fail. It is not easy to please everybody <img src='http://mibuso.com/blogs/belias/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mirko</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-206</link>
		<dc:creator>mirko</dc:creator>
		<pubDate>Mon, 10 Oct 2011 14:43:34 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-206</guid>
		<description>@peter, i just tested your code...mmh, I've to check it but I think you're right and I have to trash this article...too bad...</description>
		<content:encoded><![CDATA[<p>@peter, i just tested your code&#8230;mmh, I&#8217;ve to check it but I think you&#8217;re right and I have to trash this article&#8230;too bad&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mirko</title>
		<link>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-205</link>
		<dc:creator>mirko</dc:creator>
		<pubDate>Mon, 10 Oct 2011 14:15:34 +0000</pubDate>
		<guid>http://mibuso.com/blogs/belias/2011/10/10/compare-2-records/#comment-205</guid>
		<description>@ara3n: yes, it works, but if i want the function to be used in the whole application without rewriting it everytime, i need recref. You can say: it's just a format(rec) = format(rec2). This leads to my answer to peter --&#62;

@peter: you have to run my code, because i use an array of 5 elements of text1024 (i wrote it in the post), so you can compare up to (1024*5) characters per single record, and if i am correct, the max size of a record in nav is 1024*4.

&#60;--back @ara3n: I want to avoid to create and compare arrays every time i need this function.

@Me: it's better to post the objects before publishing an article... :(</description>
		<content:encoded><![CDATA[<p>@ara3n: yes, it works, but if i want the function to be used in the whole application without rewriting it everytime, i need recref. You can say: it&#8217;s just a format(rec) = format(rec2). This leads to my answer to peter &#8211;&gt;</p>
<p>@peter: you have to run my code, because i use an array of 5 elements of text1024 (i wrote it in the post), so you can compare up to (1024*5) characters per single record, and if i am correct, the max size of a record in nav is 1024*4.</p>
<p>&lt;&#8211;back @ara3n: I want to avoid to create and compare arrays every time i need this function.</p>
<p>@Me: it&#8217;s better to post the objects before publishing an article&#8230; <img src='http://mibuso.com/blogs/belias/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
</channel>
</rss>
