Forum Replies Created

Viewing 15 posts - 826 through 840 (of 14,953 total)

  • RE: Strange thing with "SET DATEFORMAT"

    SQL Kiwi (9/14/2012)


    GSquared (9/14/2012)


    SQL Kiwi (9/14/2012)


    Rather than trying to navigate all the quirks of the interpretation of strings as dates, use an explicit style:

    -- Style 103 = dd/mm/yyyy

    SELECT DATEPART(DAY, CONVERT(date,...

    - 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: A Quick Count

    I have about a dozen with various IT-related products/companies/whatever marketed on them.

    My current favorites aren't IT though. I recently got a couple of custom t-shirts with:

    Front:

    Vote Illuminati

    No matter...

    - 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?

    Stefan Krzywicki (9/14/2012)


    GSquared (9/14/2012)


    Stefan Krzywicki (9/14/2012)


    Brandie Tarvin (9/14/2012)


    Stefan Krzywicki (9/14/2012)


    GilaMonster (9/14/2012)


    Anyone get the increasing feeling people are looking for the 'eazy button'?

    Case in point:

    "I read through those articles [on index...

    - 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: Strange thing with "SET DATEFORMAT"

    SQL Kiwi (9/14/2012)


    Rather than trying to navigate all the quirks of the interpretation of strings as dates, use an explicit style:

    -- Style 103 = dd/mm/yyyy

    SELECT DATEPART(DAY, CONVERT(date, '13/09/2012', 103));

    Or ANSI/ISO...

    - 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?

    Stefan Krzywicki (9/14/2012)


    Brandie Tarvin (9/14/2012)


    Stefan Krzywicki (9/14/2012)


    GilaMonster (9/14/2012)


    Anyone get the increasing feeling people are looking for the 'eazy button'?

    Case in point:

    "I read through those articles [on index column ordering], but...

    - 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: Difference between a CROSS JOIN and a 'comma'

    Or "by design because they hoped it would never come up and couldn't figure out a good solution for it". I've seen that one before too. (As opposed...

    - 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: Stored Procedure help

    Like this:

    DECLARE @StartDate DATE = '20120101';

    WITH Seeds(Seed)

    AS (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: Difference between a CROSS JOIN and a 'comma'

    Brandie Tarvin (9/14/2012)


    The execution plans on both of them are identical. Same objects, same percentages. (Once I swap the tables in the FROM clause, that is). Same results, same everything.

    But...

    - 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: Difference between a CROSS JOIN and a 'comma'

    Gazareth (9/14/2012)


    They are equivalent, but I don't think you can mix the two types of join in the same query.

    It's the where clause that's causing the difference in the results,...

    - 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 Case When

    What isn't working about it. Do you get an error message? Get the wrong results? Something else?

    - 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: Using a variable as a field name - Syntax question

    Yep. Knowing which forum/site to use isn't helped by the fact that they're all "SQL". Definitely feel for you on that one.

    - 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: Using #TEMP Tables

    Partial recompile.

    Statement-level, not proc-level.

    Example here: http://sqlserverplanet.com/sql-optimization/temp-table-recompiles/

    Excellent article on table variables and temp tables and other options: http://www.simple-talk.com/sql/t-sql-programming/temporary-tables-in-sql-server/

    - 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: Difference between a CROSS JOIN and a 'comma'

    Gazareth (9/14/2012)


    They are equivalent, but I don't think you can mix the two types of join in the same query.

    It's the where clause that's causing the difference in the results,...

    - 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: Using a variable as a field name - Syntax question

    PL/SQL doesn't declare variables with @ symbols on them, per the samples I found. Here's an example: http://www.plsqltutorial.com/plsql-variables/

    The problem you're running into is that T-SQL (Microsoft's version of SQL)...

    - 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?

    I couldn't find an answer to this guy's question: http://www.sqlservercentral.com/Forums/Topic1359181-391-1.aspx?

    I always thought that "," and "CROSS JOIN" were identical, but he found a case where they aren't. "," generates...

    - 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 - 826 through 840 (of 14,953 total)