Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 leocattqv
		
			leocattqv
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi all,
I am trying to filter out records from loading using the where clause - I have more than one code that I dont want in.
I have tried multiple variations on:
Where([Failure Mode] <> 'OR06 - Shippping Issue')
OR ([Failure Mode] <> 'OR03 - Incorrect Quantity Sent') ;
I know this is a rookie move - but can someone give me a direction? its driving me crazy
thanks
-L
May be this?
Where Not WildMatch([Failure Mode], 'OR06 - Shippping Issue','OR03 - Incorrect Quantity Sent')
May be this?
Where Not WildMatch([Failure Mode], 'OR06 - Shippping Issue','OR03 - Incorrect Quantity Sent')
 sunny_talwar
		
			sunny_talwar
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Or may be you AND between them
Where([Failure Mode] <> 'OR06 - Shippping Issue') AND ([Failure Mode] <> 'OR03 - Incorrect Quantity Sent') ;
 
					
				
		
 uroboros
		
			uroboros
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Okay, but he should use it better:
Where not Match([Failure Mode], 'OR06 - Shippping Issue','OR03 - Incorrect Quantity Sent')
For a better performance.
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
you might as well load your unwanted Failure Modes from a source you can maintain outside of your script code and exclude matching records using the Exists() function:
tabFailModExcl:
LOAD * INLINE [
excluded Failure Mode
OR06 - Shipping Issue
OR03 - Incorrect Quantity Sent
OR02 - Incorrect Product Sent
OR01 - Insufficient Product Quality
];
tabShipments:
LOAD RecNo() as ID, * INLINE [
Failure Mode
OR01 - Insufficient Product Quality
OR02 - Incorrect Product Sent
OR03 - Incorrect Quantity Sent
OR04 - Incorrect Color Sent
OR05 - Incorrect Size Sent
OR06 - Shipping Issue
OR07 - Due Date exceeded
]
Where not Exists([excluded Failure Mode],[Failure Mode]);
DROP Table tabFailModExcl;
(replace inline loads with you real sources)
hope this helps
regards
Marco
 
					
				
		
 MarcoWedel
		
			MarcoWedel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		or maybe like this:
mapFailModExcl:
Mapping
LOAD *, 0 INLINE [
excluded Failure Mode
OR06 - Shipping Issue
OR03 - Incorrect Quantity Sent
OR02 - Incorrect Product Sent
OR01 - Insufficient Product Quality
];
tabShipments:
LOAD RecNo() as ID, * INLINE [
Failure Mode
OR01 - Insufficient Product Quality
OR02 - Incorrect Product Sent
OR03 - Incorrect Quantity Sent
OR04 - Incorrect Color Sent
OR05 - Incorrect Size Sent
OR06 - Shipping Issue
OR07 - Due Date exceeded
]
Where ApplyMap('mapFailModExcl',[Failure Mode],1);
hope this helps
regards
Marco
