Charindex not working not unicode SQL 2012

  • I have a large dataset which contains a field that has multiple values separated by a ; this was working but stopped. It stopped because even though the ; still exists in the dataset, charindex is not finding it. The field type in varchar(100) as you can see from the code below I first return the whole field (visible identification that ; is present), second field is the result of the function at issue, 3,4,5 are all verification that the actual value in the field and in the function are semicolons by ascii 59, finally verifying that the field does not contain a bunch of hidden characters the length is 7 the field if visibly 7.

    Select rejectcode, charindex(rejectcode,';'), ascii(SUBSTRING(rejectcode,3,1)), ascii(SUBSTRING(rejectcode,7,1)),

    ascii(';'), LEN(RejectCode) from RejectClaim where RejectClaimID = 141104

    ResultsSet

    9G;569;05959597

  • having a bad day, please disregard

  • John1.5.nlt (12/11/2015)


    having a bad day, please disregard

    Not long before the weekend!

    The absence of evidence is not evidence of absence
    - Martin Rees
    The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
    - Phil Parkin

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply