I've been using the following syntax in my 'Transact-SQL' procedure in Version 9 Anywhere.
I've updated to V11 and it is rejecting this syntax. (The SELECT @fCurrent =) part. I can change it to SET but it then converts the procedure to Watcom which cause other issues to long for this post. Can anyone help please.
SELECT @fCurrent = coalesce(sum(tran_header_gross_inc_tax * tran_header_sign),0.00)
WHERE EXISTS (SELECT 1 FROM client_structure_ref WHERE (tran_header.client_id_pf = client_structure_ref.client_id_pf
AND client_structure_ref.ucs_user_id_pf = vUserID
AND client_structure_ref.client_structure_ref_type = vControl))
AND tran_header_date_raised <= vReportDate //transactions was raised prior to printing date
AND (tran_header_closed_date IS NULL //and has yet to be closed
OR tran_header_closed_date > vReportDate) //or has been closed since
AND COALESCE(tran_header_first_group_date, '1899-12-31') > @fLastPeriodDate;