Forum Replies Created

Viewing 15 posts - 12,406 through 12,420 (of 14,953 total)

  • RE: Stored Procedure critique, please

    I would change the SFound thing to an If Exists or If Not Exists. It should, however, work as written, and this is a minor change and not critical.

    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: Cursor and while loop

    This sounds like a test question to me. Or an interview question. Do you have a specific situation you are trying to resolve?

    - 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: Fragmetation

    Jeremy Brown (8/6/2008)


    GSquared (8/6/2008)


    You can't defrag a table that doesn't have a clustered index. Simple as that.

    Sure you can! Put a clustered index on the table.

    Ok, I know...

    - 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: Reads

    Per Books Online:

    logical reads

    Number of pages read from the data cache.

    physical reads

    Number of pages read from disk.

    It's under "SET STATISTICS IO".

    - 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: BCP

    Well, you'd have to select a list of tables, and their rows, then create a dynamic export script to create the files and export to them.

    I don't think it's 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: Cannot connect to sql server

    What kind of connection are you trying to establish? What application? Are you on the other side of a firewall from the server?

    - 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 did you learn SQL

    Since I'm over 30, and "learned me some SQL" from someone over 30, I guess you should disregard anything I have to say on this, but here goes:

    Spend time 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: How do I execute a variable that contains a query string?

    You can either use exec(@qrystr) or use sp_executesql. Tend towards sp_executesql, since it at least slightly reduces the dangers of dynamic SQL (which is what this is).

    - 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: ISA Server

    I'm going to hazard a guess that either one of the servers has the wrong date on it, or someone set the calendar ahead one day to test something (or...

    - 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: ISA Server

    Jeff Moden (8/6/2008)


    From the description of things, it sounds like you have some code somewhere that makes tomorrow's database today... maybe, in more than one spot. I'm thinking 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: getting the next month base on a date

    declare @DHire datetime

    select @dhire = '6/2/2008'

    select

    case

    when datepart(day, @dhire+30) = 1 then @dhire + 30

    else dateadd(day, -1 * datepart(day, @dhire+30), dateadd(month, 1, @dhire+30))+1

    end

    Test it with a few dates. Should...

    - 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: Converting Datetime to INT

    cast(replace('2007/01/01', '/', '') as int)

    If you cast/convert a datetime value to Int, you'll end up with the number of days since 1/1/1900, not the format you're looking for. 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 enable SQL Server Browser - SNMP for SQL Server 2005

    It's a service. Right click "My Computer" or "Computer" (depending on your server version), select Manage, go to Services, make sure it's running and is set to start 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: Automatic Statistics Maintenance - Good or Bad

    Both turned on, and scheduled maintenance plans to update stats periodically and rebuild certain indexes.

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

    Start by running DBCC CHECKDB on the database.

    - 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 - 12,406 through 12,420 (of 14,953 total)