select a.id_no, a.name, b.account, b.name, a.inv_total,a.inv_status,a.inv_code,a.inv_no,a.inv_due,c.id_no,c.id_desc, max(a.inv_inotes) as mInvoice ; from customer_invoices a, customer_accounts b,customer_notes c ; where a.id_no=gnclientid and !empty(inv_code) and a.name=b.account and a.inv_code==c.id_no ; group by a.inv_code,a.inv_due,a.id_no,a.name,b.account,b.name,a.inv_status,c.id_no,c.id_desc,a.inv_no,a.inv_total ; into cursor sql_pre readwriteThis code show me trying to use an expression on the memo field for the purpose of a aggrivated field. However, it does not work with memo fields. If I add it straight, it blows a group by invaild error even when I add the field to the group by string. any suggestions or anyone encounter this?? I am not trying to group by the memo field, i just want to add it to the cursor.