• It's going to be a bit slow but something like the following will do it...

    SELECT columnlist

    FROM dbo.SomeTable

    WHERE (SomeColumn LIKE '%[^ ] [^ ]%' OR SomeColumn LIKE ' [^ ]%')

    AND SomeColumn NOT LIKE '% %'

    ;

    Seems like homework though... you need to be able to explain it. Lookup "LIKE" in Books Online. If you don't know what "Books Online for SQL Server" is, you might want to spend some time on that, as well.

    --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)