Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 mambi
		
			mambi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
i'm connecting qv with mysql db and i have a varchar field like this :
Column:
10+22
3-4
15+10
...
in the load script or in a chart i want to evaluate each row so i'll get :
Column
32
-1
25
i don't want to use subfield in the load script because it duplicate rows.
the function evaluation returns 0.
any idea how to do it ?
 
					
				
		
 mambi
		
			mambi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		tried this but no result,
now even if i reload your document i'm getting 0
 
					
				
		
 mambi
		
			mambi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		which version of qv are you using please ?
 
					
				
		
QV11.20 SR8
 
					
				
		
 mambi
		
			mambi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		i'm using QV11.20 SR2
can we get the same result with a chart ( without using evaluate function) ?
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
one front end solution could be:
=Pick(Match(column,'$(=Concat(column,chr(39)&','&chr(39)))'),$(=Concat(column,',')))
hope this helps
regards
Marco
 
					
				
		
 mambi
		
			mambi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		thank you for your help Sir,
but what if i have a large set of data -> performance ?
is there any solution to do it via the loading script ?
 
					
				
		
 perumal_41
		
			perumal_41
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi ,
Evaluate() function will work. but still problem with Evaluate(), then use below script
Load *,
if (mid(column,FindOneOf(column, '+-*/')) ='+',
Left(column,FindOneOf(column, '+-*/') -1)+Right(column,len(column)-FindOneOf(column, '+-*/') ),
if (mid(column,FindOneOf(column, '+-*/')) ='-',
Left(column,FindOneOf(column, '+-*/') -1)-Right(column,len(column)-FindOneOf(column, '+-*/') ),
if (mid(column,FindOneOf(column, '+-*/')) ='*',
Left(column,FindOneOf(column, '+-*/') -1)*Right(column,len(column)-FindOneOf(column, '+-*/') ),
Left(column,FindOneOf(column, '+-*/') -1)/Right(column,len(column)-FindOneOf(column, '+-*/') ) ))) as New_column
Resident table;
 
					
				
		
 mambi
		
			mambi
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Thanks a lot for your help,
it also works but what if i have 10+23+14+.... (NB : in the same row i have only one sign + or - )
