Forum Replies Created

Viewing 15 posts - 1,006 through 1,020 (of 14,953 total)

  • RE: Odd values in msdb.dbo.backupset

    Are they consistently at the same time of day, or days of the week, or any sort of temporal pattern like 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: Best Strategy to Create a Million Files using SSIS

    sradez_DBA (8/13/2012)


    Thank You All for sharing your thoughts.

    As i said the project is interesting.What makes it interesting is if you have 9 different companies who want to share there products...

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

    Are you familiar with Common Table Expressions (CTEs) and the ranking functions (Row_Number() to be specific)?

    Here's a generic sample for pivoting a fixed number of columns:

    with CTE as

    (select *,

    Row_Number() over...

    - 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: comma in SQL

    CTEs don't start with a semicolon. No need for one before a WITH (responding to Joe's comment). The problem isn't a semicolon before WITH, the problem is 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: Using REPLACE with a string where I need to replace %anystring% with some new string

    Alternatively, if you really need to use Replace instead of Stuff for this, try using Substring to get the piece that you want to replace. Build the Substring parameters...

    - 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 REPLACE with a string where I need to replace %anystring% with some new string

    I could be wrong, but I'm pretty sure Replace() won't take regex or other patterns. I'm pretty sure it only deals with strings or string-type variables with pre-defined values.

    However,...

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

    Will it always be two columns (0 & 1), or will it be variable?

    If variable, search online for "t-sql dynamic cross-tab" or "t-sql dynamic pivot". You'll find good articles,...

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

    Matt Miller (#4) (8/13/2012)


    Jeff Moden (8/11/2012)


    L' Eomot Inversé (8/11/2012)


    I wouldn't claim that the problem can be avoided, simply that it is just as serious with (application-visible) surrogate keys as with...

    - 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: Best Strategy to Create a Million Files using SSIS

    Sounds like a serious step backwards in data management technology.

    Don't call the database for each row of data. Use a script object to write each row to a file.

    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

  • RE: Survey data structure

    My first instinct is four tables:

    Survey-takers table, with name, address, etc. Might want to normalize further and name addresses in a sub-table, depending on the business rules needed.

    Questions table,...

    - 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: Loopback address

    Data on loopback address here: http://www.bing.com/search?q=Loop+back+address&src=ie9tr

    The Webopaedia and Wikipedia links are very informative on the subject.

    - 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: sql traces capturing all the sp_reset_connections all the time

    Are you talking about the default trace, or a custom trace?

    - 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: Best Strategy to Create a Million Files using SSIS

    I think a For Each loop is what you'll need. Can't think of any other way to do it.

    Might want to split them up into smaller chunks in multiple...

    - 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: XML PATH Concatenate Syntax

    I just noticed, I kept calling it the "root node", which isn't fully accurate. It's actually the row-level node. The root node would be for the whole dataset.

    - 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: XML PATH Concatenate Syntax

    The name of the root node goes there.

    Try this:

    SELECT *

    FROM (VALUES (1),(2)) AS V(Col)

    FOR XML PATH('RootNote'), TYPE;

    Result:

    <RootNode>

    <Col>1</Col>

    </RootNode>

    <RootNode>

    <Col>2</Col>

    </RootNode>

    Change the string, change the name of the node.

    A null-string (empty string, zero-length string)...

    - 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 - 1,006 through 1,020 (of 14,953 total)