Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Hi, Guys,
I`ve some trouble. I have two tables of data. From the store and from the warehouse. Like in tables below.
| Purchase no. | Agent | 
| 1 | Tom | 
| 2 | John | 
| 3 | Steve | 
| 4 | John | 
| 5 | John | 
| 6 | Steve | 
| Purchase no. | Stockman | 
| 1 | Rick | 
| 3 | Jeff | 
| 4 | Rick | 
| 6 | Rick | 
I need to select only purchases that has no stockman. Any suggestions?
 
					
				
		
 alexandros17
		
			alexandros17
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HEre is an example
 
					
				
		
 alexandros17
		
			alexandros17
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		HEre is an example
 MK_QSL
		
			MK_QSL
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		T1:
LOAD *, Purchase as PID Inline
[
Purchase, Stockman
1,Rick
3,Jeff
4,Rick
6,Rick
];
T2:
LOAD * Inline
[
Purchase,Agent
1,Tom
2,John
3,Steve
4,John
5,John
6,Steve
] Where Not Exists(PID,Purchase);
Drop Field PID;
 
					
				
		
 rustyfishbones
		
			rustyfishbones
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Try
=IF(ISNULL(Stockman),'No Stockman',Stockman)
 
					
				
		
 veidlburkhard
		
			veidlburkhard
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi Dominykas,
you can solve the problem in your script. See below:
Agent:
LOAD * Inline [
PurchaseID,Agent
1,Tom
2,John
3,Steve
4,John
5,John
6,Steve
];
Join(Agent)
LOAD * Inline [
PurchaseID, Stockman
1,Rick
3,Jeff
4,Rick
6,Rick
];
NoConcatenate
Purchase:
LOAD *
Resident Agent Where IsNull(Stockman);
DROP Table Agent;
Enjoy
Burkhard
