Forum Replies Created

Viewing 15 posts - 10,516 through 10,530 (of 14,953 total)

  • RE: Stored Procedure not functioning correctly

    This line, "WHERE DECODER_ID = DECODER_ID" will make it update every row. I think you want the second one to be a variable. Not sure which variable 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: Keep It Simple

    I try to make my maintenance plans as lazy as possible. I set them up to do the minimum necessary to make sure everything works well. That means...

    - 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: Datetime - find records that are created in a date/time range

    You seem to have deleted the original question and all its specifications.

    If it has a createddate field in the table, it should be a matter of using something like this:

    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: Straighten me out using "Top 1"

    Sounds like it's not the shark tank it originally sounded like. Cool biz.

    Good luck on getting the guy trained up. That's always a good thing.

    - 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: cmdexec after maintenance plan

    Glad we could help.

    - 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: improvement or suggestion to simple query

    Are you in a position where you can either add columns to the table or create an indexed view on the table?

    If you add some calculated columns and index them,...

    - 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: Unable to delete/drop table and view

    SQL 2000:

    Query Analyzer:

    drop table YourTableName

    Enterprise Manager:

    Right-click table, select Delete

    SQL 2005

    Management Studio:

    Right-click table, select Delete

    drop table YourTableName

    That'll get rid of the table completely.

    Management Studio/Query Analyzer:

    truncate table YourTableName

    That'll empty the table out...

    - 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: Unable to delete/drop table and view

    You can issue a drop command on a table or view (or any other database object). That'll actually get rid of it. Is that what you want? ...

    - 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: The Vermillion Screen of Death (Raw Materials Comic Strip)

    skjoldtc (3/11/2009)


    Unknown... that's how I feel sometimes when trying to figure out my wife.

    SELECT Response FROM dbo.Husband

    WHERE Question = 'Honey, do I look fat in this?"

    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: Update with a join where more than one value can be returned

    Here's how I'd handle that:

    ;with CTE

    (Row, LookupCode, LookupID)

    as

    (select

    row_number() over (partition by LookupCode order by othercode),

    LookupCode,

    LookupID

    from

    dbo.LookupTable)

    UPDATE TempFactTable

    SET CodeID = LookupID

    FROM TempFactTable t

    inner join CTE

    on t.LookupCode = CTE.LookupCode

    and 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

  • RE: Guest Editorial: Improving Northwind

    mhaskins (3/11/2009)


    Steve Jones - Editor (3/11/2009)


    I tend to think that we ought to have separate sample dbs.

    GSquared (3/11/2009)


    Separate databases also works.

    I love the way it sounds much more official when...

    - 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: Moving Data from a colum in one table into multiple columns of another

    Are there a maximum of three tests? If so, this should do what you need:

    CREATE TABLE #Table_3(

    [Patient] [nchar](10) NULL,

    ...

    - 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: The Vermillion Screen of Death (Raw Materials Comic Strip)

    Charles Kincaid (3/11/2009)


    Sorry GSquared. You answered an OR question by saying "Yes". That even more funny that the cartoon. :D:laugh::hehe::smooooth:

    Boolean humor! Yep! (Too bad 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: Datetime - find records that are created in a date/time range

    Does the table in question have a column in it that holds the creation date?

    Have you tried to write a query for this? If so, what problem are 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: sqlserver.exe and memory usage

    SQL Server will end up using as much RAM as you allow it, in most cases, not just to cache common data, but also hold execution plans, for execution space,...

    - 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 - 10,516 through 10,530 (of 14,953 total)