 




<?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: Logical file to include only one of many matching records in secondaryu file</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/</link>
	<description></description>
	<lastBuildDate>Sun, 19 May 2013 00:45:31 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: tomliotta</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/#comment-71953</link>
		<dc:creator>tomliotta</dc:creator>
		<pubDate>Thu, 24 Dec 2009 23:54:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-71953</guid>
		<description><![CDATA[&lt;i&gt;Performance is important as the data I’m retrieveing is for a client facing web application.&lt;/i&gt;

That&#039;s contradictory to the design of the database. If many rows simply duplicate values in multiple columns, it&#039;s the database design that&#039;s at the root of performance issues.

Actually, you haven&#039;t said if performance issues exist. You only said that you don&#039;t want to run into any. Have you actually tried a SELECT DISTINCT?

Tom]]></description>
		<content:encoded><![CDATA[<p><i>Performance is important as the data I’m retrieveing is for a client facing web application.</i></p>
<p>That&#8217;s contradictory to the design of the database. If many rows simply duplicate values in multiple columns, it&#8217;s the database design that&#8217;s at the root of performance issues.</p>
<p>Actually, you haven&#8217;t said if performance issues exist. You only said that you don&#8217;t want to run into any. Have you actually tried a SELECT DISTINCT?</p>
<p>Tom</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justindouglas</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/#comment-46829</link>
		<dc:creator>justindouglas</dc:creator>
		<pubDate>Fri, 27 Oct 2006 04:45:15 +0000</pubDate>
		<guid isPermaLink="false">#comment-46829</guid>
		<description><![CDATA[I&#039;m running JAVA code agains the database and so have to retrieve a JDBC recordset from the secondary file for each primary reocrd.

For now I&#039;ll do that. I might then either create an SQL view as mentioned or possibly an RPG stored procedure which would do the chain and return a primary record which included the required field from the secondary file (RPG stored procedure would do the chain).

I just wanted to try and have a join logical so that the index was maintained by the operating system and available - rather than executing a query against the DB each time (performace overhead).
Performance is important as the data I&#039;m retrieveing is for a client facing web application.]]></description>
		<content:encoded><![CDATA[<p>I&#8217;m running JAVA code agains the database and so have to retrieve a JDBC recordset from the secondary file for each primary reocrd.</p>
<p>For now I&#8217;ll do that. I might then either create an SQL view as mentioned or possibly an RPG stored procedure which would do the chain and return a primary record which included the required field from the secondary file (RPG stored procedure would do the chain).</p>
<p>I just wanted to try and have a join logical so that the index was maintained by the operating system and available &#8211; rather than executing a query against the DB each time (performace overhead).<br />
Performance is important as the data I&#8217;m retrieveing is for a client facing web application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: stevekc5f</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/#comment-46830</link>
		<dc:creator>stevekc5f</dc:creator>
		<pubDate>Thu, 26 Oct 2006 16:12:39 +0000</pubDate>
		<guid isPermaLink="false">#comment-46830</guid>
		<description><![CDATA[If you&#039;ve got a logical and want one of any of the matching records in the secondary file, why not just do a chain?  You&#039;ll get one record, and can access the common fields you need.]]></description>
		<content:encoded><![CDATA[<p>If you&#8217;ve got a logical and want one of any of the matching records in the secondary file, why not just do a chain?  You&#8217;ll get one record, and can access the common fields you need.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steveccnj</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/#comment-46831</link>
		<dc:creator>steveccnj</dc:creator>
		<pubDate>Thu, 26 Oct 2006 12:24:52 +0000</pubDate>
		<guid isPermaLink="false">#comment-46831</guid>
		<description><![CDATA[I would stick with SQL personally.  The entire machine is SQL under the covers, so it&#039;s silly to worry about performance in these cases.  I would SELECT with a join from T1 to T2, that chooses the MIN or MAX of the T2 key(s). That would bring back only 1 matching row from T2.  You could use CREATE VIEW to store the DDL in the library (similar to a JOIN LOGICAL) or just invoke the SQL at run time.]]></description>
		<content:encoded><![CDATA[<p>I would stick with SQL personally.  The entire machine is SQL under the covers, so it&#8217;s silly to worry about performance in these cases.  I would SELECT with a join from T1 to T2, that chooses the MIN or MAX of the T2 key(s). That would bring back only 1 matching row from T2.  You could use CREATE VIEW to store the DDL in the library (similar to a JOIN LOGICAL) or just invoke the SQL at run time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ashnirody</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/#comment-46832</link>
		<dc:creator>ashnirody</dc:creator>
		<pubDate>Thu, 26 Oct 2006 12:05:18 +0000</pubDate>
		<guid isPermaLink="false">#comment-46832</guid>
		<description><![CDATA[You have a one to many relationship between two files and you want to join the two files getting only one particular record from the second file for each record in the primary file. How do you know which record you need from the second file? Either (a). the record in the second file has fields with certain values in which case you can use a join logical with a select/omit OR (b). there are common fields on both files that have the same values in which case you could use a join logical using the common fields to join the two files.

If you can send me a DDS of the two files and your requirements for the selection of records I will try to help you.]]></description>
		<content:encoded><![CDATA[<p>You have a one to many relationship between two files and you want to join the two files getting only one particular record from the second file for each record in the primary file. How do you know which record you need from the second file? Either (a). the record in the second file has fields with certain values in which case you can use a join logical with a select/omit OR (b). there are common fields on both files that have the same values in which case you could use a join logical using the common fields to join the two files.</p>
<p>If you can send me a DDS of the two files and your requirements for the selection of records I will try to help you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: justindouglas</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/logical-file-to-include-only-one-of-many-matching-records-in-secondaryu-file/#comment-46833</link>
		<dc:creator>justindouglas</dc:creator>
		<pubDate>Thu, 26 Oct 2006 04:17:43 +0000</pubDate>
		<guid isPermaLink="false">#comment-46833</guid>
		<description><![CDATA[Thanks ashnirody,

I&#039;d already looked at join logicals, but because there is a one to many relationship between my primary and secondary fiels, I would get duplicates of my primary record data.

I had a look on the web and all I found related to this was the DDS keyword JDUPSEQ. This keyword deals with the ordering of duplicates rather than removing duplicates which is what I want to do.

I&#039;m not sure what I want to do is possible.]]></description>
		<content:encoded><![CDATA[<p>Thanks ashnirody,</p>
<p>I&#8217;d already looked at join logicals, but because there is a one to many relationship between my primary and secondary fiels, I would get duplicates of my primary record data.</p>
<p>I had a look on the web and all I found related to this was the DDS keyword JDUPSEQ. This keyword deals with the ordering of duplicates rather than removing duplicates which is what I want to do.</p>
<p>I&#8217;m not sure what I want to do is possible.</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/10 queries in 0.029 seconds using memcached
Object Caching 337/343 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-19 02:39:28 -->