Forum Replies Created

Viewing 15 posts - 61 through 75 (of 14,953 total)

  • RE: OR in the where clause or two select statements and a union

    Most likely, SQL Server will resolve the OR and the Union options the same way: Split the query in two and then merge the results together.

    Look at the execution plans...

    - 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 load xls & xlsx files in SSIS in one Data Flow Task

    Clarification needed: Are you loading 2 files at the same time, or are you loading 1 file that might be in a different format different times?

    I.e.: Do you have an...

    - 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: Interview Questions

    Sean Lange (6/7/2016)


    Jeff Moden (6/7/2016)


    Eric M Russell (6/7/2016)


    They're asking the wrong type of questions for a job interview.

    I think it's a great question. It shows whether or not 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: Need logic behind the below 5 statements

    mcfarlandparkway (6/9/2016)


    TY Champion,

    These variables...

    - 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: Find the long running query and kill it

    Do your users know that you're planning on doing that? It sounds seriously drastic.

    If you really want to do this, you can find this data in sys.dm_exec_requests. https://msdn.microsoft.com/en-us/library/ms177648.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: UDF slow even when used as a persisted computed column

    The most common cause of "sudden slowdown of what used to be fast" is a change of data volume.

    The second most common is hardware degradation (RAID rebuild, etc.).

    After that, it's...

    - 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: Displaying Column Data Horizontally Using Pivot Table

    It's hard to help you write a query with this little to go on.

    Any chance you could include the table structure (as a "Create Table" statement, not just text), and...

    - 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: Need logic behind the below 5 statements

    The logic I see is a cascading calculation from some row in a table with an "F" in it, up to a value from another table.

    If the variables aren't used...

    - 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 testing works in real time environment

    What kind of testing? In what environment?

    - 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: Multi Column Date Between Statment

    It looks like you want to use 1 of 2 end date values. 1 from the query, 1 from a variable.

    Any rules? Like use the lowest value? ...

    - 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: Duplicates and ROW_NUMBER ()

    The subject you're asking about is called "data hygiene". It's about things like duplicates, unexpected NULL values, out-of-expected-range values, and a whole lot of other similar issues.

    It takes a...

    - 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: PK/FK Relationship Question/Help

    Sounds about right.

    In SSIS, you'd set it to redirect error rows.

    In T-SQL, you have to write your own error-handling routine.

    - 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: UDF slow even when used as a persisted computed column

    Have you tried replacing the computed column with a static column?

    Does the data in this table get changed frequently through direct connections? That's the main reason to use computed...

    - 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: PK/FK Relationship Question/Help

    You can drop and recreate foreign key constraints if you want to load data in the main table first. This can create problems with untrusted constraints. It can...

    - 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: Why do people use CHAR(n) to put variable length strings into the column?

    Multiple possible reasons:

    1. They don't know better and don't have a good reason

    2. If the length variation falls in certain patterns, fixed-width stores more efficiently because of the 2-byte variable-length...

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