Forum Replies Created

Viewing 15 posts - 32,431 through 32,445 (of 59,099 total)

  • RE: Can somebody recommend reliable sql backup software?

    I'm NOT a product evangelist for Red Gate... but I definitely like their backup tools. Restores with many log file backups are an absolute breeze which is especially good...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: SQL Script to Run DOS Batch File

    pelusodm (9/26/2011)


    I am running SQL Server 2008. I have created a batch file that executes the dtexec.exe program on my local PC which in turn runs an SSIS Package...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Code help, may be can be acheived through CTE

    VGish (9/27/2011)


    Hi Jeff,

    This works perfectly like what I wanted...But, I didn’t understand this part …Why are we doing this?

    ROW_NUMBER() OVER (ORDER BY ID,Date) - ROW_NUMBER() OVER (PARTITION...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Code help, may be can be acheived through CTE

    Actually, I made a small mistake. While the code works perfectly for the data given, I left an "opening" for an incorrect sort. Please use the following code,...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: UPDATE Check

    CELKO (9/27/2011)


    A table has to be a set, so unless you truly have one and only one part, then you want a plural or collective name.

    Heh... that's one more...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: UPDATE without listing all columns?

    yubo1 (9/27/2011)


    You can use sql-code below instead of update

    truncate table table_1

    &

    INSERT INTO table_1 A (col1, col2, col3, col4, ....)

    SELECT B.col1, B.col2, B.col3... FROM table_2 B

    The problem is that the OP...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: UPDATE Check

    ghanshyam.kundu (9/27/2011)


    i am completely agree with jeff. and manipulating the query as per him

    UPDATE p

    SET Part_Cost = I.Vendor_Cost

    FROM PART p inner join Part_Supplier PS on p.partid=ps.partid

    INNER JOIN Inventory I on...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: UPDATE Check

    John,

    I agree that there's only one column to be updated here and so it won't make much difference for this example, but using the strictly ANSI syntax for UPDATE in...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Code help, may be can be acheived through CTE

    VG...

    For future posts, please consider the methods for posting "readily consumable" data which are taught at the first link in my signature line below. Since you're relatively new here,...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: SQL Script to Run DOS Batch File

    Give the user absolutely no privs except to call a stored procedure that calls a job with a command task in it.

    Better yet... why not just have the user run...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: subqueries help

    justintime (9/26/2011)


    if i just run

    SELECT

    bl_id,

    case when rm_type in ('WKSTATION','OFFICE') then 1 else 0 end count_seats

    FROM rm

    then that works fine, i just need to aggregate my data points. ...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: converting extended ascii characters

    jonathan.silver (9/26/2011)


    Wow, that's really interesting. Thanks.

    Is the collation setting by user or server based?

    and then, if I wanted to make sure all of those funny ascci codes -

    ¡ ...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: UPDATE Check

    mwendecker7686 (9/26/2011)


    I am I using the Update statement correctly here? I have a table called Part (PK =PartId)which is tied to a supplier in a table named Part_Supplier (PK =SupplierId,...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: Trouble calculating a column (need some help)

    bennett_js (9/26/2011)


    Hi Jeff. Thanks for the example. It works well. I read through the articles you suggested. And now have a much better understanding of what's required and where you...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • RE: The 2011 SQLServerCentral Party at the PASS Summit

    SQLRNNR (9/21/2011)


    I really want to be there. Not too terribly sure I will make it. I have registered for Summit - but I have other family related things...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 15 posts - 32,431 through 32,445 (of 59,099 total)