Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Updating 2nd row values with 1st row - response (1) by dnoeth

$
0
0

Hi Subbu,
you just have to add this condition to the query i posted in:
developer.teradata.com/blog/dnoeth/2013/07/how-to-spell-a-numeric-value-in-english-words#comment-65238

update tab as t
set col3 = (select col3 from tab as t2 
            where t2.col2 = t.col2
            and t2.col1 = t.col1+1)

Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>