Forum Replies Created

Viewing 15 posts - 2,776 through 2,790 (of 14,953 total)

  • RE: Power Tools at Work

    I've ground up a hard drive with a power-grinder (grinding wheel, whatever), and I've melted one down with a welding torch. Was fun both times, but you do have...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: I have a coworker....

    Dev (11/22/2011)


    I think it's the right place to throw my question once again... 'Why 2 Cents'... (I will start a new thread soon...)

    It used to be "penny for...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: delete from XQuery using sql:variable

    sql:variable and sql:column can return values, but not paths. To use it that way, you need to build a dynamic SQL statement that puts the literal path in the...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SELECT inside a FROM - bad programmming practice?

    Revenant (11/21/2011)


    DECLARE @temp TABLE ( name VARCHAR(20), total INT );

    INSERT INTO @temp

    SELECT Name, SUM(Consumption)

    FROM tablename

    GROUP BY Name;

    DECLARE @maxValue INT = ( SELECT MAX(total) FROM @temp );

    SELECT...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: No.of weekdays in each month

    Here's a solution that doesn't use a Calendar table:

    CREATE PROC dbo.DeleteMe

    (@WeekDay INT,

    @FromDate DATE,

    @ToDate DATE)

    AS

    ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SELECT inside a FROM - bad programmming practice?

    Revenant (11/21/2011)


    bomborde (11/21/2011)


    . . . I must do this without a select inside a from.

    . . .

    Can anyone do this without a 'view' or 'join' or 'order by'? . ....

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: No.of weekdays in each month

    Second the motion on using a calendar table. They're tremendously useful, and will be MUCH faster than the kind of function you built.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SELECT inside a FROM - bad programmming practice?

    bomborde (11/21/2011)


    I still want to learn on my own as always try to do. I searched for efficiency tests about the order by, max(), and so on. but nothing. Since...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    It must be DBA season somewhere. That's four admitted interview questions just today on the forums. And those are just the ones who fessed up.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SELECT inside a FROM - bad programmming practice?

    Honestly, I'd use Top 1 With Ties, use an appropriate Order By on the Sum() function, and let the interviewer know that you got some help online to make sure...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Control flow Vs Data flow

    This page has definitions: http://msdn.microsoft.com/en-us/library/ms139914.aspx

    Do you have specific questions, or are you just trying to figure out which one is which?

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SELECT inside a FROM - bad programmming practice?

    Not without an Order By, but a simple Sum() and Order By would do it. Do that all the time.

    Is it a homework/test/interview type question, where artificial constraints like...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Ninja's_RGR'us (11/21/2011)


    GSquared (11/21/2011)


    Brandie Tarvin (11/21/2011)


    And it just happened at work.

    "But we're using NOLOCK in this stored procedure. How could it have gotten killed due to a deadlock?"

    <headdesk><headdesk><headdesk>

    Cargo Cult programming. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (11/21/2011)


    And it just happened at work.

    "But we're using NOLOCK in this stored procedure. How could it have gotten killed due to a deadlock?"

    <headdesk><headdesk><headdesk>

    Cargo Cult programming. Gotta love...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Are the posted questions getting worse?

    Jack Corbett (11/21/2011)


    Hey, for those not on Twitter (why aren't you). My dad passed away early this morning. Not unexpected. I blogged about it, http://t.co/hCjjRnRh if you...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 2,776 through 2,790 (of 14,953 total)