﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Teradata Forums / Teradata  / Teradata Database  / Highest Priority / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>Teradata Forums</description><link>http://www.teradata.com/teradataforum/</link><webMaster>info@teradata.com</webMaster><lastBuildDate>Wed, 03 Dec 2008 16:47:57 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Highest Priority</title><link>http://www.teradata.com/teradataforum/Topic12474-9-1.aspx</link><description>Thanks Dales, it works.</description><pubDate>Wed, 13 Aug 2008 06:09:26 GMT</pubDate><dc:creator>Ince</dc:creator></item><item><title>RE: Highest Priority</title><link>http://www.teradata.com/teradataforum/Topic12474-9-1.aspx</link><description>Select * fromVW_Party_Identification where ext_identification_type_cd in (SelectExt_Identification_Type_Cdfrom(select ext_identification_type_cd, rank() over (order by priority asc) rowrank from Priority) subtable1where rowrank=1))How about that?</description><pubDate>Tue, 12 Aug 2008 15:12:34 GMT</pubDate><dc:creator>Dales</dc:creator></item><item><title>RE: Highest Priority</title><link>http://www.teradata.com/teradataforum/Topic12474-9-1.aspx</link><description>HiI have table A which will be linked to table B containing my pririoty list,Table A is as follows:SELECT   party_id  ,O_Party_Id  ,O_Party_Role_Cd  ,Ext_Identification_Num  ,Ext_Identification_Type_CdFROM VW_Party_Identification Aand Table BSelect    Ext_Identification_Type_Cd   ,Priority   ,Party_Type_CdFrom Priority B;So how do I join the two queries to make sure that I bring back the highest priority for Party_Id incase party_id has more than one Ext_Identification_Type_Cd.The two tables join on Ext_Identification_Type_Cd.</description><pubDate>Tue, 12 Aug 2008 05:57:53 GMT</pubDate><dc:creator>Ince</dc:creator></item><item><title>RE: Highest Priority</title><link>http://www.teradata.com/teradataforum/Topic12474-9-1.aspx</link><description>If the table is named LT_IDENTITY, try:select identity_type, identity_type_cd, priority from (select identity_type, identity_type_cd, priority,rank() over (order by priority asc) rowrankfrom LT_IDENTITY) awhere rowrank=1;</description><pubDate>Mon, 11 Aug 2008 13:22:54 GMT</pubDate><dc:creator>Dales</dc:creator></item><item><title>Highest Priority</title><link>http://www.teradata.com/teradataforum/Topic12474-9-1.aspx</link><description>HiDoes any one knows how to create a query that will pick the highest priority of from the list below,if I have an ID_Number and Passport, the query must pick ID_Number since is the one with the highest priority.Identity Type	ID_Type_Cd	PriorityID_Number            18                      1Passport               15                      2Other                    0                       3</description><pubDate>Thu, 07 Aug 2008 11:08:38 GMT</pubDate><dc:creator>Ince</dc:creator></item></channel></rss>