Forum Replies Created

Viewing 15 posts - 22,621 through 22,635 (of 59,102 total)

  • RE: File Size from T-SQL

    ralu_k_17 (10/17/2014)


    Hi,

    I need a way to get a physical file's size from T-SQL, without using xp_cmdshell.

    My exact situation is this:

    I need to query a folder (TB of data), with the...

    --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: Temporal SQL Server Databases

    Randy AV (10/18/2014)


    I am one of the authors of "Managing Time in Relational Databases" published by Morgan Kaufmann and reviewed by Joe Celko. While writing the book, we also...

    --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: File Size from T-SQL

    spaghettidba (10/19/2014)


    Jeff Moden (10/17/2014)


    Gazareth (10/17/2014)


    spaghettidba (10/17/2014)


    If this is an import project, SSIS might be what you're looking for

    Seconded.

    Heh... I like the OP's idea of doing this all from T-SQL. ...

    --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: File Size from T-SQL

    Gazareth (10/17/2014)


    spaghettidba (10/17/2014)


    If this is an import project, SSIS might be what you're looking for

    Seconded.

    Heh... I like the OP's idea of doing this all from T-SQL. I do it...

    --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: It's about Perception

    Gary Varga (10/17/2014)


    Perception is key. Especially to performance.

    Within a UI context, users are more likely to be patient when you use a wait cursor so that they know that work...

    --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: How to use stuff function in this case

    gautham.gn (10/15/2014)


    Hi Guys,

    This is how I achieved the result.

    select a,b, stuff(

    (select ', '+level1 from

    (select a,b,c+'('+

    stuff((select ', '+d from example with (nolock)

    where a = x.a and b = x.b and...

    --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: How to use stuff function in this case

    gautham.gn (10/14/2014)


    Thanks everyone.

    But Can we achieve the result without cte.

    I want to use stuff inside stuff.

    And I achieved it guys.

    Thanks for supporting me guys..

    Great. Glad you achieved what 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: Help Newbie here, new to sql

    imran.shah (10/14/2014)


    It hasn't actually resolved because now anything in base is showing as a base currency.

    I put the G/L as a left join and anything I had in the where...

    --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: Reclaim space from compressed partition table

    UserRR (10/13/2014)


    I've been trying to reclaim a large amount of wasted space on partitions that are no longer growing

    1. What do you consider to be a "large amount" 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: extract number from string

    It'll be interesting when an actual vendor name also contains dashes. 😛

    --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 Audit Table

    The problem with adding to procs to "update" the audit table is that if the audit table changes, you must find and update all those procs or, perhaps, managed 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: Bending strings

    I started working on the article last night but didn't finish it. It's coming.

    --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: How to use stuff function in this case

    It's late and I'm out of coffee so I might not be thinking clearly. This does 1 + x + y table scans where "x" is the

    unique number...

    --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: Improving Index Seek

    UDBA (10/13/2014)


    The table has about 1.5 billion rows, maybe that's why it's not able to correctly estimate the "Estimated Rows". Query is not timing out, it is using the execution...

    --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: Bending strings

    Steve Jones - SSC Editor (10/13/2014)


    Not sure. I wasn't sure how to frame this, but I've seen the concatenation question regularly, and sometimes with some aggregation or summary (like counting...

    --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 - 22,621 through 22,635 (of 59,102 total)