• On the other if you were to use COALESCE you code could look like this

    SELECT @PatientHospitalID = COALSESCE (LTRIM(RTRIM(@PatientHospitalID)), 0)

    shorter and eaiser to read imho