SELECT * FROM "MailAddresses" WHERE "OwnerId" = TO_NUMBER(@OwnerId,'999999')