Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Effective Date, Sequence Effective in the script

Good morning, this is my first post on the forum I hope to be posting in the right area.

I'm learning to work with QlikView but caught at one point and I hope you can help me.

I have two tables:

tab_mov_acad - With has the status of my students for effective date, effective sequence.

tab_mov_acad_detalhes_desnormalizada - This table'm desnormalizando day by day my records as a basis for analysis.

Screenshot_1.jpg

Issue:

For me to find out what the status of my student in a "date" (column) in the database I use the code:

select a.acao,

          a.motivo,

          b.data

  from tab_mov_acad a,

         tab_mov_acad_detalhes_desnormalizada b

  and a.data_efetiva = ( select max(c.effdt)

                                    from tab_mov_acad c

                                  where c.data_efetiva <= b.data

                                      and a.cod_pessoa = c.cod_pessoa

                                      and a.nivel_ensino = c.nivel_ensino

                                      and a.stdnt_car_nbr = c.stdnt_car_nbr

                                      and a.programa = c.programa)

  and a.sequencia_efetiva = ( select max(e.data_efetiva)

                                              from tab_mov_acad e

                                            where b.data_efetiva  = e.data_efetiva

                                                and a.cod_pessoa    = e.cod_pessoa

                                                and a.nivel_ensino  = e.nivel_ensino

                                                and a.stdnt_car_nbr = e.stdnt_car_nbr

                                                and a.programa      = e.programa)   

Can help me?

grateful Victor

Community Browser