Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Is it possible to use SELECT TOP in an ExecuteSQL statement?

 

I can find no mention or questions about this on the web.

 

I want to find the most recent date in a range of dates and pass this to a script. SELECT TOP would enable this very easily.

Posted

I don't think it is supported natively.  The obvious way around it is to do an ORDER BY and use the FM function getvalue to retrieve the first or last value in your list (depending on your sort)

Posted

I'm not familiar with what SELECT TOP is supposed to do, but it sounds like SELECT MAX() could work, and I believe it's supported.

Posted

Select TOP is not supported

 

Select MAX() is not the same thing, it selects the maximum from some values, not the first one.

 
Posted

Thanks chaps. It does seem a bit odd that it's not supported. It's a very useful thing.

 

I will look into the getvalue function and muddle through with that. :D

This topic is 4388 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
×
×
  • Create New...

Important Information

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