Hi everyone,
I have data of the following type for which I want to generate unique ID's:
School_ID Number of classrooms in grade 9 Number of classrooms in grade 8
1101 2 1
1102 1 0
I want to generate a variable by the name of Class_ID which should contain an unique ID for each classroom of each grade.
For example: For School with School_ID 1101 -- I want the class ID for the first classroom of grade 9 to be like 11019A (where in the first four digits are the School_ID, next digit is what grade whether 9 or 8, and last digit is the unique identifier for that classroom denoted by letter A).
Similarly, for the another classroom in grade 9, the ID should be 11019B.
Is there a code which can help me to do so?
Kindly please suggest!
Thank you very much,
Rachita
I have data of the following type for which I want to generate unique ID's:
School_ID Number of classrooms in grade 9 Number of classrooms in grade 8
1101 2 1
1102 1 0
I want to generate a variable by the name of Class_ID which should contain an unique ID for each classroom of each grade.
For example: For School with School_ID 1101 -- I want the class ID for the first classroom of grade 9 to be like 11019A (where in the first four digits are the School_ID, next digit is what grade whether 9 or 8, and last digit is the unique identifier for that classroom denoted by letter A).
Similarly, for the another classroom in grade 9, the ID should be 11019B.
Is there a code which can help me to do so?
Kindly please suggest!
Thank you very much,
Rachita
Comment