Forum Replies Created

Viewing 15 posts - 1,711 through 1,725 (of 14,953 total)

  • RE: sp_addrolemember with Map

    Did you create (or already have) the user in the database before you gave them permissions? That's the usual sequence.

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

    Revenant (4/12/2012)


    GSquared (4/12/2012)


    GilaMonster (4/12/2012)


    GSquared (4/12/2012)


    Or do you have something more specific in mind?

    Today's example:

    SELECT <stuff> FROM

    Table1

    inner join (SELECT <more stuff> INTO #Temp FROM AnotherTable) ON <join clause>

    inner join (....repeat...

    - 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 desperate help with SQL Server

    Important note: Don't start shrinking files till you've done a few more steps to prep for that. I mentioned shrinking files, and don't want you to get ahead of...

    - 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 desperate help with SQL Server

    It won't free up disk space directly. You'd have to either delete files or shrink files for that.

    Log backups, in Full recovery, will usually free up space inside 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: Need desperate help with SQL Server

    Log backups would be a good place to start for that.

    But if the databases were in Simple recovery, and they're full anyway, that won't help. You'll need to expand...

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

    GilaMonster (4/12/2012)


    GSquared (4/12/2012)


    Or do you have something more specific in mind?

    Today's example:

    SELECT <stuff> FROM

    Table1

    inner join (SELECT <more stuff> INTO #Temp FROM AnotherTable) ON <join clause>

    inner join (....repeat several more...

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

    Steve Jones - SSC Editor (4/12/2012)


    Both printers here are acting up. One doesn't want to inject ink on the the paper. The other keeps sending offline messages to 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: Are the posted questions getting worse?

    GilaMonster (4/12/2012)


    I'm getting very frustrated (and very saddened) by the (apparently) increasing number of people who seem to feel that writing T-SQL is about throwing code segments together at 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: junk characters in a field

    Lynn Pettis (4/12/2012)


    GSquared (4/12/2012)


    Eugene Elutin (4/12/2012)


    ...

    It's entirely possible someone with better C#/VB.NET skill than mine can make a CLR function that's faster, but the options I found online for...

    - 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 Where Any Column Equals (or Like) Value

    If you want to test equality conditions, you can do this:

    Where @Parameter in (Col1, Col2, Col3)

    That will find any column that is equal to the parameter value.

    Can't do that so...

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

    Grant Fritchey (4/12/2012)


    Lynn Pettis (4/12/2012)


    What would happen here on SSC if the TOP 25 posters did nothing but lurk for 24 hours?

    Not much. There'd just be a few more unchallenged...

    - 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: junk characters in a field

    I just ran another speed test. 23,028 rows needed phone numbers cleaned. Took 734 milliseconds total, 733 ms CPU time.

    - 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: junk characters in a field

    Eugene Elutin (4/12/2012)


    ...

    It's entirely possible someone with better C#/VB.NET skill than mine can make a CLR function that's faster, but the options I found online for that were all...

    - 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: junk characters in a field

    dwain.c (4/12/2012)


    GSquared,

    Thanks for pointing out an issue with the ampersand REPLACE I was doing. I corrected my post accordingly.

    Now as to performance, I'm curious why you think the version...

    - 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: junk characters in a field

    If you want a more efficient version, that doesn't require as much pre-processing, any CLR, etc., try something like this:

    CREATE TABLE #T (String VARCHAR(100)) ;

    INSERT INTO #T -- Sample...

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