PFW query query 
Author Message
 PFW query query

I'm trying to create a query listing all items in a stock table that are
understock (ie., with the stock on hand less than the minimum stock leve),
but as far as I can make out comparisons between fields in the same record
are a no-no.  Is this _really_ the case?

(BTW, no tragedy if not - it's easy enough, though clumsy, to do with a
TCursor and scan loop.)

Ta, butting.

--
Bryce Utting      ()Z |                 Life is short.
University of Waikato |
Code grunt for hire   |                   Pray hard.



Fri, 24 Jan 1997 11:07:22 GMT
 PFW query query


Quote:
>I'm trying to create a query listing all items in a stock table that are
>understock (ie., with the stock on hand less than the minimum stock leve),
>but as far as I can make out comparisons between fields in the same record
>are a no-no.  Is this _really_ the case?

No.  It is very easy to do what you are trying to do.  All you have to do
is use an example element, which you create in a query by pressing F5.

Create an example element in the "minimum stock level" field. Call it
anything you want, say MSL.  In the "stock on hand" field, type:
"< MSL".  (Be sure to again make "MSL" an example element.  I.e. Remember
to press F5 before typing it.)   All that remains is to check the fields
you want in the answer table and run the query.

Hope this helps.

--



Fri, 24 Jan 1997 19:12:28 GMT
 PFW query query

writes:

Quote:
>>>>I'm trying to create a query listing all items in a stock table that

are
understock (ie., with the stock on hand less than the minimum stock leve),
but as far as I can make out comparisons between fields in the same record
are a no-no.  Is this _really_ the case?

(BTW, no tragedy if not - it's easy enough, though clumsy, to do with a
TCursor and scan loop.)<<<<
----------------------------------------------
Bryce,

This should be simple with an example element.  Try the following:

PRODUCTS.DB | Product     | On Hand        | Minimum Level  |
                        | Check       | < _min           |  _min          
    |

_min is an example element, invoked in the interactive query by pressing
F5 before typing "min".  The underline is not part of the interactive
element name, but when you save the query to its native text format, it
will display as such.

Good luck,

Rob



Fri, 24 Jan 1997 21:14:02 GMT
 PFW query query

 > but as far as I can make out comparisons between fields in the same record
 > are a no-no.  Is this _really_ the case?

I'm no ace with queries, but doesn't this do the trick?

   MYTABLE | Reorder Level | On Hand        |
           | _reord        | Check < _reord |

cheers,
peter

==============================================================================
             Peter Hyde, South Pacific Information Services Ltd
             Christchurch, New Zealand -- Perry's proud new dad
          <<< Please use c.d.paradox for ALL relevant messages! >>>



Sun, 26 Jan 1997 13:02:16 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Insert query PfW 5.0

2. pfw 4.5: conditional calcs in queries

3. PFW: printing reports from queries

4. PFW: query -- OR, iif?

5. Query using UDF joined to a sub query vs Temp Table to sub Query

6. Access attach to PfW 5.0 tables or Counter field in PfW 4.5

7. Query Query Query

8. Upgrading from PFW v1.0 to PFW v5.0

9. Query From Query Results

10. Subject: SQL Query - MAX, Grouping and Sub query

11. access query converted to sql7 query

12. Part of query in query result


 
Powered by phpBB® Forum Software