pfw 4.5: conditional calcs in queries 
Author Message
 pfw 4.5: conditional calcs in queries

Could anyone give me a pointer on calculating new fields in a query that
are conditional on existing fields.

I'm ok on calculating values using example values (eg calc a+b as newvar  
or calc sum(y) as total). What I want is to calc newvar as x if y=1
                                                           x-z if y=2
                                                           z   if y=3

Is there a syntax to do this kind of thing. Or do I have to calculate this
on a form first - or do I have to get into objectpal (which I havent done
so far)

==============================================================================

Dave Thornton                                                Tel: 091 374 2876
Information Technology Service                               Fax: 091 374 3741
University of Durham

South Road
Durham
DH1 3LE
UK



Fri, 28 Mar 1997 16:48:25 GMT
 pfw 4.5: conditional calcs in queries

: I'm ok on calculating values using example values (eg calc a+b as newvar  
: or calc sum(y) as total). What I want is to calc newvar as x if y=1
:                                                            x-z if y=2
:                                                            z   if y=3

Why not do it on three lines:

TABLE | y      | newvar |
      | 1      | calc x |
      | 2      | calc x-z |
      | 3      | calc z |

--
==============================================================================

||   (the rest of this .sig is under construction...)                       ||
==============================================================================



Sun, 30 Mar 1997 08:48:22 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. Help with date calcs in PfW 4.5

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

3. More than +/-* calcs in query Pdox 4.5 Win?

4. Installing PfW 7 over 4.5

5. PfW 4.5 Report windows missing methods

6. Mail labels with PfW 4.5

7. PFW 4.5

8. (PFW 4.5) Text attributes from OPAL

9. PFW 4.5 minimize/maximize question...

10. PfW 4.5 Default locking with data models?

11. Running PfW 5.0 apps using 4.5 Runtime

12. Trouble connecting PfW 4.5 (sql) to database server


 
Powered by phpBB® Forum Software