Home Page for the TeradataForum

Archives of the TeradataForum

Message Posted: Wed, 10 Feb 2016 @ 07:51:50 GMT

  <Prev Next>  
Next> Last>>  

Subj:   Split Table on Rank function
From:   Sridhar K

Dear Forum,

I have an requirement where I need to split the table rows into multiple parts while reading. Table has key values but they are not sequential. So is it possible to write a query to split the rows based on rank and get corresponding Key values.

In the below example, I want to split into three partitions and get the corresponding starting keys 1000, 1006, 1010.

Please also let me know if there is any other better approach.

     Key    Rank
     1000       1
     1005       2
     1006       3
     1009       4
     1010       5
     1100       6

Thanks in advance.

Thanks & Regards,

Sridhar K

  <Prev Next>  
Next> Last>>  
  Top Home Privacy Feedback  
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023