S D
accessd667 at yahoo.com
Tue Mar 30 03:03:33 CST 2004
I'm not sure but I don't think that this CAN be done with SQL. You'll have to use PL/SQL...but that's Oracle. Sander Martin Reid <mwp.reid at qub.ac.uk> wrote: Stuck on this Has to be done in SQL if possible as they want to use it as the criteria in a query Need to work out the following using SQL If D1 > D2 or D1 = D2 Then TM= A+B+C1+D1 Else TM= A+B+C1+D2 Next One is A+B+ Higher of (C1+D1) OR (C2+D2) Martin -- _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com --------------------------------- Do you Yahoo!? Yahoo! Finance Tax Center - File online. File on time.