• dc.pc100 (9/30/2013)


    How or where would i add the below

    Where [SourceData] like '%[0-9]%' + 'Jan' + '[0-9]%'

    as lots of data gets messed up with dwains code

    e.g

    Destination File Name....sourcedata2

    20130616.xlsx..............0616.xlsx

    201307.xlsx.................07.xlsx

    HSE.201306.xlsx...........HSE.06.xlsx

    HSE.201307.xlsx...........HSE.07.xlsx

    2013 ICT Calendar.xls....ICT Calendar.xls

    Inv.10017355.txt..........Optus.Inv.7355.txt

    Yup mine won't handle those.

    Have you tried Jeff's code with this case?

    I think using LIKE like you are trying to do is going to be a pain because you'd need 12 of them OR'd together.


    My mantra: No loops! No CURSORs! No RBAR! Hoo-uh![/I]

    My thought question: Have you ever been told that your query runs too fast?

    My advice:
    INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
    The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.

    Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
    Since random numbers are too important to be left to chance, let's generate some![/url]
    Learn to understand recursive CTEs by example.[/url]
    [url url=http://www.sqlservercentral.com/articles/St