Forum Replies Created

Viewing 15 posts - 14,176 through 14,190 (of 14,953 total)

  • RE: Parameters in columns

    You might also want to take a look at the Pivot command in Books Online. That might do what you need.

    - 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: Adding/updating rows of data that is missing but not in sequential order

    http://www.Simple-Talk.com (another of RedGate's pages), has an "SQL Pretifier" on it. There's a link on the front page. It will do that kind of color-coding.

    - 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: Calculating percentages in a table

    Just to be clear: Are you doing this calculation in a query in the database, or in some reporting application?

    If it's a query in the database, I can probably 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: The Optimists

    Jeff Moden (4/16/2008)


    Thanks, Gus... the order was to preserve Asimov's original order and because they can be broken down more simply as "Protect the data, protect the project, protect 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: Stored Procedures - Must declare the scalar variable "@TempTable"

    Take a look at IsNull() and Coalesce() in Books Online. They'll do what you need.

    - 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: execution plan question

    What I'm seeing in the execution plan is mainly a cursor that should probably be replaced with an update command. If you're having trouble with the query, most likely...

    - 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: Get Difference from rows on different tables.

    There are a couple of ways to do this. One is:

    select sum(col1), sum(col2),...

    from

    (select col1, col2, ...

    from dbo.table1

    union all

    select -1 * col1, -1 * col2, ...

    from dbo.table2) Sub

    That will...

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

    Jeff, I love it! I'd reverse the 2nd and 3rd, but it's still quite good.

    On the article, I agree with the philosophy that the software exists only to serve...

    - 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 can i connect to a sql instance using Oracle Enterprise Manager (Oracle 10g)

    I don't think it's possible. (Based on your post title, not the text. What you ask in the actual post is definitely possible.)

    - 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: Stored Procedures - Must declare the scalar variable "@TempTable"

    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: Error in sending emails using sp_send_dbmail

    I have something similar happen before when one or more of the variables was null. Can you check for 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: I need to reinstall the Sql Server 2005 Agent

    SQL Server Express doesn't include SQL Server Agent. That's one possibility here.

    - 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 Changed Records

    Another option is to add a Timestamp (rowversion) column to the table, record that as varbinary in the history table, and compare records on that. Since the timestamp column...

    - 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: Stored Procedures - Must declare the scalar variable "@TempTable"

    The reason it's not working is because you can't have "select @TempTable.*" in a query. Also can't use the table variable name that way in Where, Having, Group By...

    - 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: Creating temp table in Stored Procedure in Sql2005

    Since the temp table is created by dynamic SQL, it is only accessible within the same dynamic SQL.

    You either need to add your inserts/updates/deletes and your final select, 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

Viewing 15 posts - 14,176 through 14,190 (of 14,953 total)