COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: Harrylytics on 18 Jul 2018 04:08:11 PM

Title: Complex calculation for generating character string
Post by: Harrylytics on 18 Jul 2018 04:08:11 PM
Hi!

I have a list containing incoming arrivals (persons) to a country. I would like to identify which people are traveling together. I have over 20 variables for this, but just to get an idea of how to do this, i am using the 7 most important variables.

Attached you find an anonimized sample to give an impression.

I would like to give unique string of 12 characters to identify people who travel together.
For this i would like to use:
timein -  the time they pass customs
datein - the date they pass customs
last name
place of stay
country of residence
edcardnumer
length of stay

If you don't have the answer, can anyone tell me how to generate a random string of 12 characters (numbers + letters)?

Thanks in advance.


Title: Re: Complex calculation for generating character string
Post by: CognosPaul on 19 Jul 2018 12:37:14 PM
What is your underlying database?

If you're looking at SQL Server, something like this should work:

https://stackoverflow.com/questions/1324063/generating-random-strings-with-t-sql