Forum Replies Created

Viewing 15 posts - 871 through 885 (of 14,953 total)

  • RE: How to get week of a mont with input parameter date.

    Easy enough:

    DECLARE @InputDate DATE = GETDATE();

    SELECT DATEADD(month, DATEDIFF(MONTH, 0, @InputDate), 0) AS FirstDayOfMonth,

    DATEADD(week, DATEDIFF(week, 0, DATEADD(month, DATEDIFF(MONTH, 0, @InputDate), 0)), 0)...

    - 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: rCTE vs LIKE for Hierarchy

    A thousand-row adjacency hierarchy should be pretty fast to resolve using an rCTE. You'll get a lot of I/O (which you've already seen), but performance should be pretty fast....

    - 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: Objects, Relationships, Systems, And Processes

    It's a good write-up of a progression on that kind of thing. But it doesn't necessarily take years to go that route. If you understand how thinking works,...

    - 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: MCM Info

    Microsoft's FAQ on the subject has details on the training (as well as other details): http://www.microsoft.com/learning/en/us/certification/master.aspx#tab5

    - 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: SSAS best pratices?, install it on separate server or on the same Production SQL Server

    I've always put it on the same server as the SQL installation. Never had a problem with that.

    - 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: From Hairdresser to DBA – How to start a career in IT

    I was in sales and marketing, then ended up as a DBA because I built some tools to track my customers and their orders.

    - 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: Dealing with commas in text fields when exporting to .csv via SSIS

    Add a "text qualifier" in the export definition. The usual is double-quotes. Or use tabs instead of commas as the delimiter, if you can. .csv files work...

    - 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: Does a tool like "SQL Agent Compare" exist?

    Have you tried the TableDiff utility? http://msdn.microsoft.com/en-us/library/ms162843.aspx

    - 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: How muliti table join in stored procedure?

    You're welcome.

    - 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: How muliti table join in stored procedure?

    It looks like this might work:

    SELECT acl.Person_ID AS 'CODE',

    ISNULL(pnr.FullName, ps.FullName) AS 'FullName',

    CASE acl.persontype

    ...

    - 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: Weird Requirement... Multiple Left Joins? Am I missing something?

    Mine won't return rows in the Docs table if they don't have corresponding values in at least one of the sub-tables. That might explain part of the rowcount difference....

    - 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: Weird Requirement... Multiple Left Joins? Am I missing something?

    Sorry for the delay in replying. Been recovering from surgery.

    Try this:

    Expand the number of documents beyond 5 up to some reasonable number, like 10,000 or 1-million. Add random...

    - 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: How to avoid this T-SQL statement affecting my TempDB?

    Glad we could help.

    - 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: Weird Requirement... Multiple Left Joins? Am I missing something?

    dwain.c (8/28/2012)


    LEFT JOINs, CROSS JOINs, FULL OUTER JOINs? What's up with that?

    Why not something a bit simpler like this?

    ;WITH CTE AS (

    SELECT n=1, DocNum, Ref,...

    - 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: Permissions issue in accessing SQLExpress 2008

    Yeah. It's one of those things that people read the headline, but not the details, then try to do it, and don't realize they're creating a worse problem than...

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