Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi. I've tried to separate my multibases by QVD Period. Im connecting by from ODBC to Many bases: The bases has the same fields
so Im using aLoad sentence Like this: The first Connection = Abr 2012, The Second Connection May 2012 and so on,
Tables:
OLEDB CONNECT TO [Provider=VFPOLEDB.1;Data Source=e:\modelos\solventa\tarjetas de credito\datos externos\bases_tc\2012\05_mayo\83 - bata;Mode=Share Deny None;Extended Properties="";User ID="";Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE;DSN="";DELETED=True;CODEPAGE=1252;MVCOUNT=16384;ENGINEBEHAVIOR=90;TABLEVALIDATE=3;REFRESH=5;VARCHARMAPPING=False;ANSI=True;REPROCESS=5];
LOAD *, 'Site1' as Source;
LOAD
Field1,
Field2
SQL SELECT *
FROM Table1
Where Field1 = 1;
OLEDB CONNECT TO [Provider=VFPOLEDB.1;Data Source=e:\modelos\solventa\tarjetas de credito\datos externos\bases_tc\2012\05_mayo\83 - bata;Mode=Share Deny None;Extended Properties="";User ID="";Mask Password=False;Cache Authentication=False;Encrypt Password=False;Collating Sequence=MACHINE;DSN="";DELETED=True;CODEPAGE=1252;MVCOUNT=16384;ENGINEBEHAVIOR=90;TABLEVALIDATE=3;REFRESH=5;VARCHARMAPPING=False;ANSI=True;REPROCESS=5];
LOAD *, 'Site2' as Source;
LOAD
Field1,
Field2
SQL SELECT *
FROM Table1
Where Field1 = 1;
and so on...
Store Tables Into $(PathProdQvd)Tables.qvd;
So I can save all the register in junst one single table.
Now I want to separe this tables and load singles Qvds by period:
Temp:
LOAD Distinct Num(Year(Date(Field2,'MMM-YY'))) & Num(Month(Date(Field2,'MMM-YY')),'00') AS Load_Period
resident Tables;
LET vCount=NoOfRows('Temp');
FOR i=0 to $(vCount)
LET vCarga = Peek('Load_Period',$(i),'Temp');
V1:
NoConcatenate
LOAD *
Resident TablesWhere Num(Year(Date(Field2,'MMM-YY'))) & Num(Month(Date(Field2,'MMM-YY')),'00') = '$(vCarga)';
STORE V1 into $(PathProdQvd)V1$(vCarga).qvd;
DROP Table V1;
Next
DROP Table Temp;
I Noticed that my QVD May has ABR and MAY Together. How can I separate the months by QVDs.
My Actual QVD is V1201204 (But Show Abr and may)
Thank you