• it'll take a bit of work, and you'll need the DelimitedSplit8K function (search SSC and read the article)

    things like 02/02 and 02-02 are not dates, so they do not get caught in my example...you'll have to add additional pattern matching on the myfn.Item like i've done with the ISDATE function...something like 'LIKE [0-9][0-9]/[0-9][0-9]

    and other similar patterns.

    With mySampledata(id,SomeComment)

    AS

    (SELECT 1,'- aaaaaaa 02/20/2002 jjjjjj sddsdjjjjsdsd sdsds

    - asdlajsd fjsdfjkdgn dsjbfks, dfjksflml,fsf,f sdfsdf 9/3/99 sjdfnsdnf sjdfoisofn

    - sdkfjos fjsdopfj uyro dlsfl 02-02-02 sflnsldfn sdkflsn

    - fdklnsdlnf 02-02 fjsksngjk

    - sdkflsdnfl 02/02 hisfdhiif sdjfsdkfk')

    SELECT mySampledata.*,

    myfn.* ,

    Case when IsDate(myfn.Item)=1 THEN CONVERT(datetime,myfn.Item) ELSE NULL END AS PotentialDate

    FROM mySampledata

    CROSS APPLY dbo.DelimitedSplit8K(SomeComment,' ') Myfn

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!