Forum Replies Created

Viewing 15 posts - 8,056 through 8,070 (of 14,953 total)

  • RE: Creating a database on sql 2005 taking longer time

    Initializing files that size will take a while, even on a blazing fast machine. Give it some 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: Not in

    Excellent. Then the join should speed things up considerably. Assuming you have indexes it can use.

    - 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 to return query results to a variable or string to use with sp_send_dbmail

    The documentation on sp_send_dbmail includes rules on attaching query results. If that won't do for what you need, what I often do is turn the query results into 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: Not in

    Try this:

    update orderimport

    set import_rec_status = 'A'

    from pharm.dbo.cms_medorderimport as orderimport

    left outer join pat..cmspatviewl vw

    on orderimport.patientid = vw.patid

    and orderimport.mardbname = vw.mardbname

    where orderimport.import_rec_status = 'i'

    and vw.patid is null;

    Might be faster.

    Also, guessing from 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?

    I run into the same issue. Can't authenticate into the page. Can post as a guest, but anyone who wants to post as GSquared can pretty much do...

    - 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: deleting duplicate records

    Just change the row_number() partition and order by in my query to suit your needs.

    - 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 I can make look like I expert on SQL Server?

    Not a chance. He's already got another thread on this site where he's bragging about the fact that someone provided a link to an article about index fragmentation, 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: Benefits of FULL Recovery model over SIMPLE (other than PIT recovery)?

    Slight benefit that you can use the log for an audit trail. Major drawback that it's going to consume more and more drive space as time goes on.

    - 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: Trigger Help

    Is the Passwords table just a log of the most recent 9 (or less) passwords that someone has used?

    If so, you could incorporate that into a single trigger that would...

    - 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: Retrieving SCOPE_IDENITY() on Insert Into, SQL Server 2005 stored proc

    To do that, you need to set it up as an output parameter for sp_executeSQL to use. Books Online has the rules for that and examples of how to...

    - 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: table variable not reseting

    Per your first post, the problem is the ID not resetting. Maybe I'm misreading this:

    As seen the first student processes just fine however the classId isn't reseting on...

    - 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: Simple SQL Server Interview Questions that people have a hard time answering...

    Trust me, that's not just a UK thing. I've never encountered it yet in the US. I was asked what I would do. I consider most managers...

    - 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: In, Not In. Why does one work but not the other?

    I use either joins or subqueries. I've found both effective.

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

    WayneS (10/20/2009)


    bitbucket-25253 (10/20/2009)


    WayneS

    Just had a "developer" send me some code.

    Wayne I submit that your problem is NOT with the developer but with either the hiring/current Manager who think that 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: deleting duplicate records

    The best method I know for deduping looks like this:

    ;with CTE as

    (select row_number() over (partition by [Load Number], [Event Code] order by 1) as Row

    from dbo.MyTable)

    delete from CTE

    where Row >...

    - 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 - 8,056 through 8,070 (of 14,953 total)