Forum Replies Created

Viewing 15 posts - 16 through 30 (of 386 total)

  • Reply To: Problem understanding SUM function with GROUP BY

    Sorry... I see now and tried MAX and that took care of it... thanks!!

  • Reply To: Problem understanding SUM function with GROUP BY

    This does not seem to work, the data returns like before:

    SELECT [user_name], [created_at],
    SUM(dbo.fnGetDecimalTime([event_sec])) as 'Decimal_Time_SUM'
    FROM [Charter].[dbo].[ConvoHrs]
    group by [user_name],[created_at]
    order by [user_name]

    • This reply was modified 2 years, 4 months ago by  DaveBriCam.
  • Reply To: Problem understanding SUM function with GROUP BY

    Thanks! One thing what if I need to add a field like [Date] (which I may want to do grouping on later)? It wants this added to the 'group by'...

  • Reply To: best way to extract name and number

    I can get the full name with this:

    ,LTRIM(RTRIM(SUBSTRING([user_name], CHARINDEX(')', [user_name]) + 1, 
    PATINDEX('%[+-][0-9]%', [user_name]) - (CHARINDEX(')', [user_name]) + 1))))
  • Viewing 15 posts - 16 through 30 (of 386 total)