Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 bramvdpoel
		
			bramvdpoel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello,
I want to make different files depending on field value. Is this possible?
Final:
Load*,
If(Exists(Akgid), Akgid, 'Null') as TestMatch
;
Load
VDBArtikel,
EAN,
Merk,
Maat,
Season,
Bruto,
Netto,
Akgid
Resident Ban
;
If TestMatch = 'Null' then store into file1.txt
Else store into file2.txt
 marcus_malinow
		
			marcus_malinow
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		This is possible, however there is an issue with your exists clause. Given that all possible values of Akgid already exist in 'Ban', you won't end up with any 'Null' values in your resulting table.
Pseudo code to split:
your initial load
then
resident load where TestMatch = 'Null'
Store and drop
resident load where TestMatch <> 'Null'
Store and drop
 mohan_1105
		
			mohan_1105
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
Sure you can store the data in a different name. Try this,
Tab1:
Load *,
From table1
where match(Field Name. 'Akgid')
Store Tab1 into [Lib: Loaction\Tab1.qvd];
Drop table Tab1;
Tab2:
Load *,
From table1
where Field Name <> 'Akgid';
Store Tab2 into [Lib: Loaction\Tab2.qvd];
 bramvdpoel
		
			bramvdpoel
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Loading with TestMatch did not work but this gave me the solution though:
Bekend:
Load
VDBArtikel,
EAN,
Merk,
Maat,
Season,
Bruto,
Netto,
Akgid
Resident Ban
Where Exists(Akgid);
Store * from Bekend into vdban.txt (delimiter is ';', txt);
Drop table Bekend;
It works now.
Thanks a lot!
