Forum Replies Created

Viewing 15 posts - 46 through 60 (of 162 total)

  • RE: The Full Stack DBA

    I don't think I cover the "full" stack, but I do much of it.  I don't do the networking or user administration for our company, or work on the website,...

  • RE: Missing Data

    Thank you for the sample data and for the desired output.  Those are much appreciated.
    I still don't understand how the data relates.  In the #MainTable for Group1, I see...

  • RE: Need a suggestion for my SQL requirement

    fahey.jonathan - Friday, November 30, 2018 11:10 AM

    You could also look at the MERGE statement, which will do inserts, updates, and deletes...

  • RE: Need a suggestion for my SQL requirement

    You could also look at the MERGE statement, which will do inserts, updates, and deletes from a source data set to a target data set in a single statement.  There...

  • RE: Issues with filling in the blanks from a calendar table.

    From your post, it seems that you want to get records of how much time users spend on various activities.  You have a log of date/time events, and need to...

  • RE: add to variable in case statement

    I think you are trying to add the results of two different calculations.  If so, then split the calculation into two individual steps, then add the results, like this.

  • RE: Do you use custom schemas?

    Jeff's earlier message said, "If you're talking about 3 and 4 part naming in any of the code itself, caveat emptor. As databases grow, they sometimes move and you end...

  • RE: Do you use custom schemas?

    Jonathan AC Roberts - Thursday, November 15, 2018 10:18 AM

    You can't create a synonym for a database, just database objects. But...

  • RE: Do you use custom schemas?

    Jeff Moden - Thursday, November 15, 2018 8:06 AM

    roger.plowman - Thursday, November 15, 2018 5:39 AM

    November 15, 2018 at 10:11 am

    #2013709

  • RE: Find birthdays of a week

    I found this thread, and found it helpful.  I have a different solution that may help someone else.  Here is my solution.  In short,  it brings the birthdates of each...

  • RE: Live data sync

    One way to do it would be to put a "WorkloadType" column on your Orders table, and keep that field updated using the triggers you use now, rather than copying...

  • RE: How to subtract a column from a query result and add the difference to another

    SELECTm.ValueField,

    m.FilterColumn,-- Either "6" or "13"

    r.Result

    FROMMyTable m

    JOIN(

    SELECTt6.CategoryCode,

    t13.ValueField - t6.ValueField AS Result

    FROM(SELECT CategoryCode, ValueField FROM MyTable WHERE FilterColumn = 6) t6

    JOIN(SELECT CategoryCode, ValueField FROM MyTable WHERE FilterColumn = 6) t13

    ONt13.CategoryCode = t6.CategoryCode

    )...

  • RE: how to calculate Average Time Duration

    To calculate "average duration", convert the duration for each record to milliseconds, then average the number of milliseconds for the group. Once you have that, then add that to...

  • RE: Aggregate data based on 1 hour intervals

    I just realized that the ROW_NUMBER() function is included in the loading script, which will not work in 2K5. This would work instead:

    SELECT(TensValue * 10) + UnitsValue

    FROM(SELECT DISTINCT colid...

  • RE: Insert dates into table in the giving range.

    Nice!

Viewing 15 posts - 46 through 60 (of 162 total)