Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have a database, and I want to make a backup of it, so I'm using a .qvd files.
Now, I wanna save per data, the hour and date when I add it to my .qvd.
How can I add a new column to my qvd?
Hi,
Use a variable with the timestamp then add it to the file name:
LET vTimestamp = Timestamp(Now(), 'YYYYMMDDhhmmss');
Data:
LOAD *
FROM Table;
STORE Data INTO [File$(vTimestamp).qvd] (qvd);
The result will be a QVD named File20121218153100.qvd
Hope that helps.
Miguel
My data will look like this:
ID, Name, date_modifed
001,Marina, 18/12/2012
Hi,
I'd rather speak in English in the general forums, there is a Spanish speaking group where all threads en español are welcome.
So, I assume that the field you want to populate is the "date_modified" so a little change to the code above will work
LET vTimestamp = Timestamp(Now(), 'DD/MM/YYYY');
Data:
LOAD *,
$(vTimestamp) AS date_modified
FROM Table;
Hope that helps.
Miguel
Ok, but this is the load... the $(vTimestamp) AS date_modified
should not be in the store?
tabla1:
LOAD ID,
Name,
Age
FROM
prueba.xlsx
(ooxml, embedded labels, table is Sheet1);
LOAD ID,
Name,
Age
FROM bk2.qvd (qvd);
NoConcatenate
tabla2:
LOAD Distinct
ID,
Name,
Age
Resident tabla1;
STORE tabla2 into bk2.qvd (qvd);
That's my code, I wanna add a column with a date when the new data would stored
Hi,
As mentioned above:
LOAD ID,
Name,
Age
FROM
prueba.xlsx
(ooxml, embedded labels, table is Sheet1);
LOAD ID,
Name,
Age
FROM bk2.qvd (qvd);
LET vDateModified = Date(Now(), 'DD/MM/YYYY');
NoConcatenate
tabla2:
LOAD Distinct
ID,
Name,
Age,
$(vDateModified) AS date_modified // this field is new, will be stored into bk2.qvd
Resident tabla1;
STORE tabla2 into bk2.qvd (qvd);
Hope that helps.
Miguel
Every time that I reload my script, all data change the date
I jus wanna change de date of the new values added
How do you identify those new values? What is the unique key? Is it possible that a value already exists in both existing and new records?
Miguel