Find a string with two dots

  • khpcbgnt - Wednesday, January 3, 2018 1:42 PM

    Thanks for all your help.

    Would be great to know about those values with 2 decimal points as well (what they mean).

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • khpcbgnt - Tuesday, January 2, 2018 5:06 AM

    Hi ,

    I have two values 13.4. and 16.8.7 in a field that is varchar type. I am trying to convert the values in this field to numeric and I am having issue with converting these kind of values which has more than one dot.

    I am trying to bypass these two strings with the following where clause but it's not working/

    WHERE Column1  not like '%.%.%'

    Any ideas?

    Thanks in advance.

    After reading all the posts on this thread, I've not been able to figure out exactly what you want to do.

    On one hand, you say that you want to convert the "field" to numeric.  On the other hand, you say you want to "bypass" (ignore, according to your WHERE clause) both of the given values (one with a single dot and one with two dots).

    What are you really trying to do?  Do you actually mean that if it has a dot in the "field" to ignore the row and if it doesn't, convert the "field" to numeric?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 16 through 16 (of 16 total)

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