Jump to content

A Dumb Querry


This topic is 6509 days old. Please don't post here. Open a new topic instead.

Recommended Posts

This must be a very dumb querry.

Would Max(::RelatedByConstant:CompoundModDateAndHour) always return the Latest Compound suitable for a relationship to an Indexed Field in the Related File.

I'm trying to find out the best way to grab the latest modified ID in a related file.

Would a concanation of Time and Hour get greater and greater,

crazy.gif

Version: v6.x

Platform: Mac OS 9

Link to comment
Share on other sites

If you have the relationship sorted by date and time fields [ascending], then Last( ) will give you the most recently modified value. If you sort them descending, ::RelatedByConstant:CompoundModDateAndHour itself will give you the correct value since the first related record is the most recent. It all depends on which one works faster for you.

I think either of these methods would be faster than a Max( ), but I'm not sure whether the difference is negligible with a large record set.

Link to comment
Share on other sites

Wow,

How could I miss this obvious. I was focussed on the Concanation field, and totally forgot the individual fields themselves.

Sure, as they are indexed (scripted), these would be suitable for a sorting relationship.

Thanks both of you.

Version: v6.x

Platform: Mac OS 9

Link to comment
Share on other sites

This topic is 6509 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.