Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys, I have doubt in fetching only those fields which are updated.
Suppose I have two fields for the date 14- june -2015,
Proj Comment
1 going well
2 proj not in time.
affecting other users.
And the field Comment field gets updated on 17-june-2015.
Proj Comment
1 going smooth no issue.
2 proj in time.
I have taken these fields in a pivot table i am getting values as
Proj Comment
1. Going well
going smooth no issue.
While I need only the last update
Proj Comment
1 going smooth no issue
2 Proj in time
Don't you have any timestamp corresponding to the changes updated? If yes, using max(timestamp) group by Proj and inner joining it with the main table will get u what u want.
Have you tried using FirstSortedValue(Comment, -Date)?
So that you can get the latest comment.
If I do inner join I can view only the max date information but I also want to view the past data of all the other tables except the table where I have Comment.
you can use a peek to flag the last updated entry
should be something like
table:
load
project,
projectcomment,
timestamp
from table
temp1
load
project,
projectcomment,
timestamp,
if(project = peek(project),0,1) as F_LastComment
resident table
order by timestamp desc, project;