• s.CustodianID and s.FundAccountantID and s.BrokerID are probably integer.

    You cannot compare between integer and varchar.