Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to do this in vbscript?
SELECT FC as factConv
FROM vConversionTC.qvd (qvd)
WHERE ID=2
and how join both table?
I need this structure:
TCO, TCD, cantBase, cantReturn
Getting better... 🙂
So, you have three fields: TCO, TCD, cantBase
Need to create one more, cantReturn.
Correct?
If yes, we need to know the rules, how to define the new field. My guess, it is based on data in qvd. And qvd has fields: TCO, TCD, FC.
If yes, you can join:
table1:
LOAD TCO,
TCD,
cantBase,
FROM table;
LEFT JOIN (table1) LOAD
TCO,
TCD,
FC
FROM vConversionTC.qvd (qvd);
And after that:
Result:
LOAD
TCO,
TCD,
cantBase,
FC*cantBase as cantReturn
FROM table1;
DROP TABLE table1;
Very possible I've missed some of your rules. Hope you got the idea and can proceed from here.
Regards,
Michael
OK
Another case, I have this load
LOAD codCompania,
codORadiales,
codAlmacen,
t_odat,
codArticulo,
FROM table1;
LOAD codCosecha,
t_fdat,
t_edat,
t_gpci;
FROM table2;
Well, I need codCosecha from table2 when t_gpci=1 and t_odat between t_fdat and t_edat.
Final Table:
load
codCompania,
codORadiales,
codAlmacen,
t_odat,
codArticulo,
codCosecha
I'm not sure I'll have time today. For now, two advices:
1. Specific: See INTERVALMATCH (help and community)
2. General: For a new question, it is always better to start new discussion. If most participants are like me, they seldom read discussions with many replies.
Regards,
Michael