Im new in DB world but I'm so excited about it.
So I have extract some data from a DB where I have a table called movements and others called movements_YYYYMM where the detailed information is so YYYY is the year and MM the month, So I have,
So I have tables like movements_202001 or movements_200701, th thing is that I need to extract some information from movements, and depending of column lapse on it I need to extract some information from "movements_+.movements.lapse" but I don't know how to properly concatenate this info in postgres.
And I don't even know if this type of querys are possible.
I was thinking in somethig like:
SELECT mv.prfix||' '||mv.number AS invoice, mvm.count
FROM movements mv, movements_+mvm.lapse mvm...
I know that's not the right way to concatenate
Thanks in advance for your help.