Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
farolito20
Contributor III
Contributor III

select from qvd using macro

How to do this in vbscript?

SELECT FC as factConv

                                                             FROM vConversionTC.qvd (qvd)

     WHERE ID=2

13 Replies
farolito20
Contributor III
Contributor III
Author

and how join both table?

I need this structure:

          TCO,  TCD,  cantBase, cantReturn

Anonymous
Not applicable

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

farolito20
Contributor III
Contributor III
Author

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

Anonymous
Not applicable

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