Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

Increment values

$
0
0

Hi there,

I have to increment sequencial values for the following:

Current Data
Col1           Col2    Col3
12.345.678  0001   32
13.456.789  0002   43


Updated Data
Col1           Col2    Col3
12.345.678  0001   32
12.345.678  0002   32
12.345.678  0003   32
13.456.789  0002   43
13.456.789  0003   43
13.456.789  0004   43


What I need is: Increment up to 3 times the values in Col2. Need to identify the first number in Col2 and increase the number up to 3.

Thanks in advance for your help.

Eric


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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