November 26, 201213 yr 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.
November 28, 201213 yr 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)
November 28, 201213 yr 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.
November 28, 201213 yr Select TOP is not supported Select MAX() is not the same thing, it selects the maximum from some values, not the first one.
November 29, 201213 yr Author 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.
Create an account or sign in to comment