Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 ritvik4BI
		
			ritvik4BI
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi All,
I have a table which has a field called TagName. This particular field has several records. example alpha, beta and gamma they are repeating. i.e not distinct. So I want a variable in the script editor storing all distinct records of TagName column.
final variable should look like this:
vTagName = 'alpha','beta','gamma'
Is this possible? If so HOW?
Thanks.
 PrashantSangle
		
			PrashantSangle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Test:
Load * Inline[
ID
1
2
3
1
];
NoConcatenate
eval_distinct:
Load Concat(DISTINCT ID,',') as all_ID
Resident Test;
Let vAll_ID=peek('all_ID');
drop table eval_distinct;
Regards,
Prashant Sangle
 PrashantSangle
		
			PrashantSangle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Test:
Load * Inline[
ID
1
2
3
1
];
NoConcatenate
eval_distinct:
Load Concat(DISTINCT ID,',') as all_ID
Resident Test;
Let vAll_ID=peek('all_ID');
drop table eval_distinct;
Regards,
Prashant Sangle
 rsaeedga
		
			rsaeedga
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This one is giving values like
alpha,beta,gamma
I need them like below:
'alpha','beta','gamma'
 PrashantSangle
		
			PrashantSangle
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi @rsaeedga ,
instead of just Concat(DISTINCT ID,',') use with chr(39)
try below code.
Test:
Load * Inline [
ID
1
2
3
1
];
NoConcatenate
eval_distinct:
Load chr(39)&Concat(DISTINCT ID,chr(39)&','&chr(39))&chr(39) as all_ID
Resident Test;
Let vAll_ID=peek('all_ID');
drop table eval_distinct;
Regards,
Prashant Sangle
