Jump to content
  • 0

I need to select the most current records (oldest date) and save them in a table


DarwinCastro

Question

Hello, I have a table with N records, where I have a field that is repeated on occasions.

imagen.png.c2099f615741698f0b1e429db4a04c35.png


I need to select the most current records (oldest date) of each identifier and save them in a table, so that I have something like this:

imagen.png.0a786e4e5f45b5fa0b8c3f9027366996.png

I need to save only 1 value per identifier and that is the one with the most current date.

I am thankful for any kind of help.

 

 

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0
9 hours ago, CoopperBackpack said:

Hello @DarwinCastro,

If Tasks are included in your plan, you may test the Task with the following design: 

moYtrCn.png

Hope this helps!

thanks, I tried but I insert all the records, not just the record with the oldest date

 

when I run the task like this, it brings me the largest record of each ID:

imagen.thumb.png.5a7c05465cf2a60e0421f527713347c0.png

But I need to save the values of the other fields, for example the observation. If I add it inside the group by, it brings me all the records, not just the largest one (as I need it)

Link to comment
Share on other sites

  • 0

@DarwinCastro,

I created the same table as on your screenshot in my account:

mm2og4B.png

 

After the Task run I received the following result:

QxkovKl.png

 

Since each ID corresponds to the specific Observacion, the Task should select 1 record for each ID and this is the record with the maximum (the most recent) date. 

Maybe I missed something in your description. For me Task works as expected. 

Link to comment
Share on other sites

  • 0

Cooper,

I need something simular to this. Because of my plan, I do not have Triggers or Tasks, but I need to retreive the MAX record from my Table or View.

Table Name: WeightLog   View Name: WeightLog_Last

image.png.1c91367cc48152573f04f0c536a88d66.png I have tried adding criteria to the View, but there isn't any a MAX or grouping function. I do not know when the last date my users entered a record, but I need to report on their last entry. I have search every where for a solution and this post is the closest that I have come to solving my problem, but like I said I do not have Triggers or Tasks.

Can you help me?

Lynda

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...