Forum Replies Created

Viewing 15 posts - 451 through 465 (of 466 total)

  • RE: Data mining

    The ^ sign at the beginning of the square brackets means not these characters. So where Last_Name like %[^a-z]% means find all last names that have any character that...

  • RE: Data mining

    samvanga's method will get you the names that only have numerics in them if that is what you want. You would also only need the first statement in the...

  • RE: Data mining

    select * from yourTable

    where Last_Name like '%[^a-z]%'

    However, this will include names with spaces in them as well, which you may also have. If you don't want those included, you...

  • RE: Datetime data type

    Strange. Something like this should convert your whole column then if that is the case.

    select convert(datetime, nullif(yourCol, 'NULL'))

  • RE: Datetime data type

    What is the code you are running? When I run this

    select CONVERT(datetime, '25-Apr-84')

    I get the result 1984-04-25 00:00:00.000. Is that not what you want?

  • RE: Converting UTC time in GETDATE clause

    No problem, just be careful if daylight savings time is involved here. 6 hours difference from UTC on a time in January may not be the same thing you...

  • RE: Converting UTC time in GETDATE clause

    If I am understanding this the way I should be then should you just need something like this

    DATEADD(hh, -6, UTCOccurrenceDateTime) >= DATEADD(day, DATEDIFF(day, 0, GETUTCDATE()), 0)

    after the AND in your...

  • RE: Converting UTC time in GETDATE clause

    It's hard to help with the code you have posted. In your first example Column1 looks like a date column. In your second example it looks like you...

  • RE: It is hard to code to process

    I just did something very similar this morning. I was combining emails from team members into one column having them separated by commas. I used the xml.value command...

  • RE: Query Question

    ;with rowCte as

    (

    select *, row_number() over (partition by store_name order by store_name) [num]

    from allStores

    )

    select case when num = 1 then storeName else '' end storeName, storeAddress

    from rowCTE

    Something like that? ...

  • RE: Query Question

    This is pretty vague. Perhaps you should lookup the WHERE clause?

  • RE: top 80 percent from sum

    Thanks Paul, I haven't made it through the comments in that article yet, but I will be sure to read through them. That error came from me switching the...

  • RE: top 80 percent from sum

    Cometav, perhaps this will help you.

    Drew and/or others, I would appriciate any feedback on this method.

    After reading Jeff Moden's article that Drew suggested (which was straightforward and very helpful), I...

  • RE: top 80 percent from sum

    Thanks Drew, I will check out that article. I am pretty new to SQL Server myself and that method was the first thing that popped into my head.

    I am...

  • RE: top 80 percent from sum

    Select top 80 percent * from <sometable>

    will get you 80 percent of the total number of records. Since you have 9 records in the table you show, it returns...

Viewing 15 posts - 451 through 465 (of 466 total)