Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I need your help! I'd like to understand how to replace a set analysis string in load script editor.
The field I would like to add directly to the table "tab_MASTER_ORDINI" is the following:
Count({$<Data = {">=$(=[DataValidazioneVenerdì]) <=$(=[DataConsegnaRichiestaVenerdìMeno])"}, GgLav={"1"}>} Data) as GgLavValidazione
The field permit me to know the number of working days (custom calendar) betxween two dates.
Database:
tab_MASTER_ORDINI (.accdb file):
LIB CONNECT TO 'K--DiPR-PPlan-_PPlan-DB_produzione.accdb';
LOAD Autore,
AutoreModifica,
Cliente,
CodiceCliente,
[...]
SettimanaMAD,
SettimanaMontaggio,
Stato,
StatoODP,
TipoOrdine,
TM,
UDM,
If (TipoOrdine = 'KD', 'pianificato', If(TipoOrdine = 'ZCAB', 'mobili', 'generici')) as StatoOrdine,
If (isnull(DataConsegnaRichiesta),'noDateReq',If (MAD <= DataConsegnaRichiesta, 'onTime', 'onDelay')) as Validazione,
Date(WeekEnd(DataValidazione)-2,'DD/MM/YYYY') as DataValidazioneVenerdì,
Date(WeekEnd(DataConsegnaRichiesta)-2,'DD/MM/YYYY') as DataConsegnaRichiestaVenerdì,
Date(WeekStart(DataConsegnaRichiesta)-3,'DD/MM/YYYY') as DataConsegnaRichiestaVenerdìMeno;
SQL SELECT Autore,
AutoreModifica,
Cliente,
CodiceCliente,
[...]
SettimanaMAD,
SettimanaMontaggio,
Stato,
StatoODP,
TipoOrdine,
TM,
UDM
FROM `tab_MASTER_ORDINI`;
How can I insert field "GgLavValidazione" directly in the table?
Thank you so much!!!! 😉
Hi,
I'm glad you are satisfied with the resolution!
Not sure that's going to work as is but you can do Date(Floor([DataField])) to make it a 'regular' Date.
That's a tricky topic in QV, you can check the Date() and Date#() functions.
Kind regards,
S.T.
I don't know why, but:
At least in my app 😅