OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

top and parameter in a query

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base
View previous topic :: View next topic  
Author Message
FreewayFred
Power User
Power User


Joined: 22 Feb 2007
Posts: 85
Location: Wisconsin USA

PostPosted: Tue Jun 30, 2009 7:22 am    Post subject: top and parameter in a query Reply with quote

I'd like to create a query that use both "TOP" and a parameter. It seems as though the HSQL parser doesn't accept a parameter and the base parser doesn't accept "TOP".

Has anyone been able to work around this?
Back to top
View user's profile Send private message
Sliderule
Super User
Super User


Joined: 29 May 2004
Posts: 2499
Location: 3rd Rock From The Sun

PostPosted: Tue Jun 30, 2009 10:44 am    Post subject: Reply with quote

FreewayFred:

You asked:
FreewayFred wrote:
Has anyone been able to work around this?

Yes,
  1. Create a VIEW using the TOP part of the query, withOUT a 'parameter'.
  2. Create a QUERY, using the VIEW above with your Parameter Query.
Therefore, you are able to use the 'best' of both worlds . . . while using all the 'tools' of the HSQL engine, and, the tools of Base to create the 'parameter prompt' in the Query.

I hope this helps, please be sure to let me / us know.

Sliderule

Thanks to add [Solved] in your first post title ( edit button ) if your issue has been fixed / resolved.
Back to top
View user's profile Send private message
FreewayFred
Power User
Power User


Joined: 22 Feb 2007
Posts: 85
Location: Wisconsin USA

PostPosted: Wed Jul 01, 2009 3:26 am    Post subject: Reply with quote

Thanks for the quick reply. After further thought I realized that, since I'm always using the most recent "WeekNumber" as the parameter, I'm going to use a subquery to return the MAX "WeekNumber" instead.

Thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Base All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group