Forum Replies Created

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

  • RE: selection getting wrong data because with nolock??

    Have you tested Snapshot Isolation on it?

    - 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: Data Export to Excel without using DTS or SISS

    If you will continue with older versions of SQL Server, sp_makewebtask is fine. However, this is from MSDN:

    sp_makewebtask is retained for backward compatibility. New Web pages are more easily...

    - 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 would YOU use the domain name of dbanalyst.com?

    Something that has nothing to do with databases or analysis thereof. Maybe pictures of kittens or something. After all, a site with pictures of kittens is a pretty...

    - 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: selection getting wrong data because with nolock??

    Does the table get a lot of updates/inserts/deletes?

    If so, page splits can cause exactly what you're talking about.

    The best way to avoid that is dump NoLock and switch to using...

    - 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: Too much code for this T-SQL

    Just to add to the clamor, normalization will most likely speed your queries and such up, not slow them down. Done wrong, it'll break everything, of course. Done...

    - 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: Too much code for this T-SQL

    dva2007 (6/28/2011)


    GSquared,

    I hate myself for not thinking this. It is one of the best solution. There must be other alternative where i can Unpivot it and then write the 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: Data Export to Excel without using DTS or SISS

    In SQL 2000, you'll have to use sp_OA_CreateObject, and use OLE automation into Excel, instead of CLR.

    - 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 need help with sql code openrow set

    I hate to say it, but this is the Internet. I don't open Office documents from unknown sources here, for obvious security reasons.

    Can you post your code 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: How to summarise date ranges to unique date range set?

    How are you defining the date ranges? Are they from an input parameter, or a table, or just completely arbitrary?

    - 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: Data Export to Excel without using DTS or SISS

    You could use CLR integration to instantiate Excel, create a file, save it, and write into it.

    - 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 separated lists into XML

    The first trick is splitting the comma-separated values into separate rows. Check out Jeff Moden's article on this site for the best solutions for that.

    After that, it should be...

    - 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: T-SQL Question: Getting different ways to reach from Point A to Point B

    Probably the easiest way to get that data is a recursive hierarchy query. I'd need to have table definitions in order to suggest anything more detailed than 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: Too much code for this T-SQL

    Since you're probably stuck with that table, try this:

    select * from England.dbo.HealthData

    where sex = 'Male'

    and hospital = 'Cleavland'

    and left(OPERTN_01 ,4)+

    left(OPERTN_01 ,4)+

    left(OPERTN_02 ,4)+

    left(OPERTN_03 ,4)+

    left(OPERTN_04 ,4)+

    left(OPERTN_05 ,4)+ (... rest of your columns)

    left(OPERTN_15...

    - 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: GRANT EXECUTE returns 'mssqlsystemresource' does not exist

    What version of SQL Server are you using?

    - 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: Error - the target table of the output into clause cannot be on either side of a relationship

    Tables that you will Output Into cannot have foreign key constraints, nor can they be referenced by foreign key constraints. There are other rules as well. The MSDN...

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