how to generate ASCII values for an alphabetic sequence

One Star

how to generate ASCII values for an alphabetic sequence

Hi,
The sequence goes like A, B, C ...... Z, AA, AB, AC ..... AZ, BA, BB, BC.... BZ, CA, CB, CC....CZ, DA......ZA, ZB....ZZ, AAA, AAB, AAC....AAZ, ABA, ABB... AZZ, BAA, BAB....ZZZ
I want output as1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20........27,28,29,,,,,,,,,,,,,,,,,,,,,,,,,,,
using talend component .
Any suggestions thanks in Advance
Regards
VK

Community Manager

Re: how to generate ASCII values for an alphabetic sequence

Hi
You can call the system function Numeric.sequence("s1",1,1) to generate a sequence number for each row. 

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: how to generate ASCII values for an alphabetic sequence

hi shong,
thanks for your reply
but if my input is A,B,C,D,AA,AB,AZ,BA,BF,BZ,ZZ,AAA,ZAB,ZZZ
THEN HOW COULD I USE Numeric.sequence("s1",1,1) 


THANKS
VK
Community Manager

Re: how to generate ASCII values for an alphabetic sequence

Hi
Add one column in the output table of tMap, and set its expression as:
Numeric.sequence("s1",1,1) 

Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now