Here is the data that needs to be transformed.
Take a look at IP 10.10.2.191. The code I already have adds the tid with the GUID that you see there. What I also need the code to do is seek out that last record 'crmresourcesthankyou.asp' and assign the SAME tid=52FC441. See what I mean?
CODE:
Exams Passed: 70-152, 70-175, 70-176
Take a look at IP 10.10.2.191. The code I already have adds the tid with the GUID that you see there. What I also need the code to do is seek out that last record 'crmresourcesthankyou.asp' and assign the SAME tid=52FC441. See what I mean?
CODE:
Code:
UPDATE W
SET PageRequested=PageRequested + '?tid=' + CONVERT(varchar(250), LEFT(NEWID(), 7))
FROM WebLog W INNER JOIN
(SELECT IP, Min(ID) AS MinID FROM WebLog
WHERE [Date]=(SELECT max([Date]) FROM WebLog)
GROUP BY IP)
as Y
ON W.ID=Y.MinID
