![]() |
|
Archives of the TeradataForumMessage Posted: Wed, 29 Jul 2010 @ 00:27:26 GMT
Your 'Where' clause would be the problem. Try using this:
Select i_pol
,i_ird
,n_lst
,n_fst
,i_ssn
,d_bth
From ( Select * From ltc_p.vltc_er_ird_mo where i_ssn = 'xxxxxxxxxx' ) P
Qualify Row_Number () Over
(Partition By i_ird
Order by Case When i_ird like 'RT%' then 0 else 1 end) = 1
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||