Forum Replies Created

Viewing 15 posts - 4,696 through 4,710 (of 14,953 total)

  • RE: DR solution..Pls respond

    To a very large extent, DR planning will depend on specific business needs, hardware availability, skillset availability, resources available/obtainable, and SLAs/SLRs.

    Virtual machines can be part of a DR plan, but...

    - 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: Avoiding Logging

    Koen Verbeeck (3/8/2011)


    In the somewhat special case of ETL, I'd sometimes like to turn of logging.

    If a data load fails, the destination table can be truncated and the load can...

    - 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: Delete rows from table

    You're welcome.

    - 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: giving error for the calculation

    It looks to me like what you're looking for is something like this:

    IF OBJECT_ID(N'tempdb..#T') IS NOT NULL

    DROP TABLE #T ;

    IF OBJECT_ID(N'tempdb..#Rules') IS NOT 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: Delete rows from table

    Try something like this:

    select INumber, Name, PortNumber, min(Account) as MinAccount

    from MyTable -- put your table name here, obviously

    group by INumber, Name, PortNumber;

    - 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: Delete rows from table

    Depending on the data types, you can either do this with a CTE and Row_Number trick, or with Min() and Group By.

    What are the data types of the columns?

    - 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: Removing specific rows

    Break it down a bit.

    First, select the rows where Runout = 1 and Qty = 0, and use Exists to test if there is another row with the same Peg...

    - 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 Wisdom Department

    I used to work for a company that insisted on long-term planning. Every project had to include data on which strategic initiatives it was meant to forward, before it...

    - 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: Using an IN Operator as a Parameter in a Stored Procedure

    Sean Lange (3/4/2011)


    Gus, that may have just revolutionized how I handle those types of situations from this point on. I took your example and put together a quick proof 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: Are the posted questions getting worse?

    SQLkiwi (3/4/2011)


    Exciting day - just had my first Simple Talk article published:

    http://www.simple-talk.com/sql/learn-sql-server/understanding-and-using-parallelism-in-sql-server/

    Haven't had time to read the whole thing yet, but it looks good so far.

    - 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: Using an IN Operator as a Parameter in a Stored Procedure

    Jeff Moden (3/4/2011)


    Cool. Thanks, Gus. I'll give it a try and read up on it in BOL but simple examples like the one you provided go a very...

    - 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: Odd Questions

    James Goodwin (3/4/2011)


    Jay,

    In your response you are assuming that the bureaucrat's job is to punish you. In truth the bureaucrat (who is, after all, just another office worker like...

    - 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: Using an IN Operator as a Parameter in a Stored Procedure

    Jeff Moden (3/4/2011)


    stewsterl 80804 (3/4/2011)


    "change the parameter to a table variable" - Brilliant!!! 😀

    Thanks!

    If you get the chance, please, I'd love to see the code that you end up with...

    - 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: Create Stored procedure Help

    Depending on what you're going to do with them, and if you're using SQL 2008 (as per the forum you posted in), you could probably use a single table-variable parameter,...

    - 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: Using an IN Operator as a Parameter in a Stored Procedure

    That will work as posted, but I bet what you're running into is passing a comma-delimited list as a single parameter and doing this kind of thing:

    create proc MyProc

    (@MyList varchar(100))

    as

    set...

    - 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 - 4,696 through 4,710 (of 14,953 total)