Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi guys,
I have SQL script, where I get respondentID and key variable "TrackId" which I load every morning.
Then I have another query where I load data based on "TrackId". Then I store the second data to qvd.
The problem is the second query has more "TrackId" value.
If I use max(TrackId) from qvd file, I skip some numbers.
Is it possible, when I load the first query, store last or maximum value of "TrackId" and then use this variable to load new data from the second query.
The new max variable should be from my last reload, not today.
Any ideas?
Thanks,
it works well, if there is Id grater than vmaxTrackId.
Hi Vladimir,
Seems to me that this error occurs when vValue is empty (at least in the screenshot seems to be empty).
If so, perhaps you can implement an if before loading your 'COMMENT_URLs' table.
If len('$(vValue)') > 0
Then
COMMENT_URLs:
SQL SELECT [Id] as paramValue, [SessionId], [TimeStamp], [Ip], [Url]
FROM [SEAC].[dbo].[UserTrack] where Id in ($(vValue));
End if
I'm not sure if it would work but perhaps it's worth to try.
Good luck
Hi Vladimir,
did you finally manage to solve it?
Regards,
I have an idea how it might work.
From my main file after each reload I create vMaxUserTrackId in Temp table. (last keyID from the main file).
Then I added new temp table to find vLastNumber, which take only 1 max(keyID) from the main file
SELECT TOP 1 paramValue FROM [cRespondentData] as cRD ...
....
Let vLastNumber = Num(Peek('paramValue', 0, 'MaxValue'));
Here I'm stuck
I need a condition
IF $(vMaxUserTrackId)>$(vLastNumber)
THEN
should be load all scripts
ELSE should be load only my qvd file.
When I added to my QV scripts the condition below
IF $(vMaxUserTrackId)>$(vLastNumber)
THEN
USERTRACKID:
SQL SELECT paramValue, respondentID
FROM cRespondentData3rdInfo WHERE surveyID=$(surveyID) and isnumeric(paramValue)=1
and paramName='UserTrackID' and paramValue>$(vMaxUserTrackId);
Starting from THEN QV reads like wrong expression.
Any suggestion, I'd be appreciated.
Thank you again,
I found out where the problem is
IF $(vMaxUserTrackId)>$(vLastNumber) THEN
IF and then should be in 1 row
but when I load only qvd file
LOAD AutoNumber(paramValue) as Auto_Id,*
FROM
ORDER BY SessionId, [TimeStamp] ASC;
It works, but gave me script error
how can I avoid it?
It looks like qvd file can't use order by.
I used resident load