Discussion Board for collaboration on QlikView Scripting.
Hi, I´m trying to do an incremental load but this is the problem:
First of all, I get a date from the SQL that tells me the date of the last data we have, this field is FUltModif.
After the first load I have a table with the initial data and this is Geo.QVD, so I get the max FUltModif and then I get it with peek() function.
LOAD Date(max(Fecha_Modif),'DD/MM/YYYY') AS Fecha_Max //I have to do a Date() function because I was getting a number instead a date.
let vUltimaModif = peek('Fecha_Max',0,'Tabla'); //Debugging I can see that this returns me a date '12/12/2000'
DROP Table Tabla;
// First I load all the old data I have in my QVD
// And I want to concatenate the new data, the data with modification dates bigger than my last modificate date from my QVD
,DepartamentoCod as DepCod
,CiudadCod as CiuCod
,BarrioCod as BarrioCod
,Date(FUltModif,'DD/MM/YYYY') as FUltModif
,Date(FUltModif,'DD/MM/YYYY') as Fecha_Modif
,Convert(varchar,DataBaseTableX.FUltModif, 103) as FUltModif // Convertion from varchar to Date DD/MM/YYYY
where FUltModif > #$(vUltimaModif)#
What I´m doing wrong?? It seems like the where clause is comparing anything,
I suppose that is because they have different formats but I don´t know why.
Help me please, thank you.
Go to Solution.
I think SQL server date format should be YYYY/MM/DD in order to understand and compare.
This little things are what makes me crazy sometimes !
May be they should change the format for 103 code...
If someone follows this thread to use it, they will need to eliminate the '#' symbols of