C creeping Registered User. Local time Tomorrow, 07:44 Joined Feb 9, 2003 Messages 20 Mar 25, 2003 #1 Hi, How do you use the MAX function on 2 fields in SQL to then produce the result a new field. i.e 12, 24 would go to: 12, 24, 24 << this is the max of fields 1 & 2 Cheers
Hi, How do you use the MAX function on 2 fields in SQL to then produce the result a new field. i.e 12, 24 would go to: 12, 24, 24 << this is the max of fields 1 & 2 Cheers
J Jon K Registered User. Local time Today, 18:44 Joined May 22, 2002 Messages 2,209 Mar 25, 2003 #2 Put this in the Field: cell of a column in the query grid:- MaxNum: IIf([Field1]>[Field2],[Field1],[Field2]) If the fields contain null values, use the Nz() function:- MaxNum: IIf(Nz([Field1])>Nz([Field2]),[Field1],[Field2])
Put this in the Field: cell of a column in the query grid:- MaxNum: IIf([Field1]>[Field2],[Field1],[Field2]) If the fields contain null values, use the Nz() function:- MaxNum: IIf(Nz([Field1])>Nz([Field2]),[Field1],[Field2])
C creeping Registered User. Local time Tomorrow, 07:44 Joined Feb 9, 2003 Messages 20 Mar 25, 2003 #3 thanks heaps