Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Filtering a Database Query

Status
Not open for further replies.

N22S

Instructor
Jun 3, 2002
12
0
0
US
In order to improve response time, I want to limit the amount of data queried from an Oracle database. For example, if I'm querying a table to create a financial statement only reflecting data from period 9, I only want to query the database fields containing that period's data instead of all 12 periods.

Obviously a broad question so I'll be very happy with broad answers that give me a place to start.

Thanks!
 
In the record selection criteria, limit rows using something akin to the following:

month({MyTable.Myfield}) = 9

You can also use a parameter (prompts for user input):

Create a date parameter and then use it in the record selection criteria:

{MyTable.MyDateField} = {?MyDateParameter}

There are several tricks to getting the SQL to pass to the datbase, there are many posts on this site related to this.

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top