Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 merry2018
		
			merry2018
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hello Together,
I try to get an conditional Statement in a Load Script, with them I will take only the Data where have the same Date how the Datefild, but it don't work.
I tried with the following Code, in three possible ways:
Tab2:
LOAD *
//**1. Way**
Where Datefild= %Key_Datum;
LOAD
KEY_Artikel,
Key_Datum,
Datefild,
//**2. Way**
//if (Datefild = %Key_Datum, taeglMenge, 0)
taeglMenge
Resident Tab1
//**3. Way**
//Where Datefild = %Key_Datum_Kalender; //date(,'DD.MM.YYYY')
;
If the Datefild and %Key_Datum are the same, it sould be in the table, all other are not.
The Table have following Dates for example:
| KEY_Artikel | taeglMenge | Key_Datum | Datefild | 
| TeilA | 10 | 10.04.2018 | 09.04.2018 | 
| TeilA | 10 | 10.04.2018 | 10.04.2018 | 
| TeilB | 25 | 13.04.2018 | 11.04.2018 | 
| TeilB | 25 | 13.04.2018 | 12.04.2018 | 
| TeilB | 25 | 13.04.2018 | 13.04.2018 | 
| TeilA | 20 | 14.04.2018 | 11.04.2018 | 
| TeilA | 20 | 14.04.2018 | 12.04.2018 | 
| TeilA | 20 | 14.04.2018 | 13.04.2018 | 
| TeilA | 20 | 14.04.2018 | 14.04.2018 | 
| TeilC | 30 | 15.04.2018 | 14.04.2018 | 
| TeilC | 30 | 15.04.2018 | 15.04.2018 | 
And I will have only the yellow marked Data, because there are the Fields "Key_Datum" and "Datefild" the same.
In the Code are 3 ways, but all of they not working, they bring no data.
 merry2018
		
			merry2018
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I tested it with the table Box and there i mean it is the same, but the way with only the where after the Resident (3d way)
Where DayStart(Datefild) = DayStart(%Key_Datum_Kalender);
don't worked.
But the first way suddenly doing, with the following changing:
LOAD *
where DayStart(Datefild) = DayStart(%Key_Datum_Kalender);
so now I have a table with only the wished Data.
Is it possible that the conditional only before in a second Load working and not in the same Load with a where after the resident
 Peter_Cammaert
		
			Peter_Cammaert
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Create an object (for example a Table Box) in which you display the numerical value of those two date fields (use the PRoperties->Number tab settings for that). The date strings are the same, but are the numerical values also identical?
If not, then add DayStart() or Floor() to each side of relation expression i nyour WHERE cvaluse to get a proper comparison.
 merry2018
		
			merry2018
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		I tested it with the table Box and there i mean it is the same, but the way with only the where after the Resident (3d way)
Where DayStart(Datefild) = DayStart(%Key_Datum_Kalender);
don't worked.
But the first way suddenly doing, with the following changing:
LOAD *
where DayStart(Datefild) = DayStart(%Key_Datum_Kalender);
so now I have a table with only the wished Data.
Is it possible that the conditional only before in a second Load working and not in the same Load with a where after the resident
