home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!hayes!fgreene
- From: fgreene@hayes.com
- Newsgroups: comp.databases.oracle
- Subject: Re: How Do you Do this in Forms 3.0?
- Message-ID: <6675.2b5f944b@hayes.com>
- Date: 22 Jan 93 06:29:31 EDT
- References: <1993Jan18.171828.14440@kodak.kodak.com> <1993Jan21.152213.14740@stortek.com>
- Distribution: na
- Organization: Hayes Microcomputer Products, Norcross, GA
- Lines: 45
-
- In article <1993Jan21.152213.14740@stortek.com>, v045100@otis1.stortek.com (Jennifer Farnham) writes:
- > Setup: One block, multiple records.
- > User may query on all fields or one,
- > or combination of.
- >
- >
- > Problem: How do I let the user know before or
- > after, how many records there query will produce? I know the user could
- > have pressed "count query hits", but I want to
- > do this for the user. I can not user COUNT_QUERY
- > procedure as it is a packaged procedure (restricted),
- > and it won't work in a pre-query or post-query.
- > I can't hard code the query, cause the user makes
- > it different each time.
- >
- > ANY IDEAS?
- >
- > Jenny
- > v045100@otis1.stortek.com
- > Boulder, Colorado
- >
-
- The easiest way is to utilize two calls to the data base. On the first,
- retrieve just a count of the records and then, on the second, execute the
- actual query. Assume a local variable XCOUNT. The first read would be
-
- SELECT COUNT(*)
- INTO xcount
- FROM the_table
- WHERE the_condition(s);
-
- You then need to add a user prompt message and reply. If the user indicates
- the desire to actually retrieve the data then execute the query.
-
- ----------------------------------------------------------------------------
- | Frank Greene | ////// ////// |
- | DELPHI SYSTEMS, Inc. | //// //// |
- | Telephone [615] 458-6032 | //// //// ////// |
- | Compuserve 74200,427 | //// //// //// |
- | 324 Ootsima Way | //// //// //// |
- | Loudon, TN 37774 | ////// ////// ////// |
- ----------------------------------------------------------------------------
- | Of course, any opinions or suggestions are strictly my own |
- ----------------------------------------------------------------------------
-
-