I have this part of my load script. I'm trying to create multiple QVD files based on a SQL query. Everything seems to work, but the commands inside the FOR...NEXT loop. QV doesn't create the table "NotaFiscal", but stores at NTF table.
Select NRNFSC, SRNOTA, to_date(DTEMIS, 'yyyymmdd') DTEMIS, to_date(DTSAID, 'yyyymmdd') DTSAID From rch0090 Where to_date(dtemis, 'yyyymmdd') >= to_date('01-jan-$(minYearOfLoadingBills)');