lundi 23 novembre 2015

how to solve below logic? using sql server?

Ι have 3 columns in my table: col1, col2 and col3.

col2 is having (1,      0,   2,   3,   4,   0,   1,   3) 
col3 is having (1234,1023,1025,1032,1234,1013,1325,1332) 

Ι have to get col1 values as

(1234,1234,1234,1234,1234,1013,1013,1013). 

Τhe logic is i have to get col3 value for col1 untill the same number repeated in column two.

Please give me any suggestion to solve this.

Aucun commentaire:

Enregistrer un commentaire