Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

How to write query or CF to generate sequence number

$
0
0

Hi Experts,

 

I want to generate a sequence number but the sequence number shall remain same for every group.

 

Exa.

Every new group shall be identified by no.1 comes in every row.

The rows containing 1 to 10 numbers shall have sequence number as group 1.

Next group will start again with 1 to 10 numbers will be group 2.

Next group will start again from 1 to 10 numbers will be group 3 so on and so forth.

But, every group need not be a 1 to 10 number in row, it would be any numbers but every group will start with No.1

 

The attached sample is herewith

 

SEQUENCE_NO_GENERATION.jpg

with Excel formula = =IF(B2=1,A1+1,A1) i can achieve this but how to do achieve this in Data services.

 

Please help.

 

Regards,


Viewing all articles
Browse latest Browse all 4013

Trending Articles



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