Forum Replies Created

Viewing 15 posts - 22,246 through 22,260 (of 59,098 total)

  • RE: get full path from sys.xp_dirtree

    serg-52 (12/8/2014)


    This batch will show all objects (directories, files) and their full paths

    --parameter

    declare @myPath nvarchar(4000) = 'E:\ElectronicArchieve';

    IF OBJECT_ID('tempdb..#DirectoryTree') IS NOT NULL

    DROP TABLE #DirectoryTree;

    CREATE TABLE #DirectoryTree (

    id int IDENTITY(1,1)

    ,subdirectory nvarchar(512)

    ,depth...

    --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: growth above normal log database!

    rmedeiros (12/10/2014)


    I have a 800GB database and have done the maintenance reindex dawn that is taking on average four hours, two days I noticed that the log is growing considerably...

    --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 format unformated phone numbers Please...,

    Now that there are multiple methods of cleaning up the data, have you considered cleaning up the source of the data so that this type of stuff doesn't happen to...

    --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: CSV file for null

    MaggieW (12/10/2014)


    Dear all:

    I created an application that will upload a csv file and insert it to a SQL table. Some of the columns allow nulls and I would like 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: Filling gaps in date ranges

    clayman (12/10/2014)


    Hello,

    See sample data below. I want hourly breakdown for the last X years, the month and day will be the same for each year. Thank you

    SELECT '2013-12-10 04:00:00.000'...

    --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: Pivoting hierarchial data

    Jeff Shurak (12/10/2014)


    I'm trying pivot to get the hierarchy on a single row an output to be emplid,supervisor's emplid,manager emplid,director emplid,vp emplid, sr.vp emplid, ceo emplid. The pivot I...

    --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: Blocking during bulk inserts

    Adam Bean (12/9/2014)


    - We turned off transactions from the application performing the bulk inserts - no change.

    What "application"???

    --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: Hashbyte Generating All Nulls

    Null + Anything = NULL

    ... but that may not be the problem because HASHBYTES will return an error on a "void", which would be produced by a NULL concatenation.

    --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: Week Wise Distribution

    ashoktheagarajan (12/9/2014)


    Hi Ed,

    Thanks for the reply. I am sorry as my question was not completely clear.

    The Week's mentioned needs to be dynamic and not a fixed input as 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: Load Folder name and Images into SQL Tables

    Did this work out for 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: Why “3653.0 and 36524.0”?

    Charles Kincaid (12/9/2014)


    Jeff Moden (12/9/2014)


    E=MC2. If you can't make it go faster, make it heavier. 😀

    LOL! When you make it go faster it is heavier. While 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: Guid FK vs Int FK

    JKSQL (12/9/2014)


    I ran into a performance issue the other day and was really confused.

    The stored procedure filled a temp table with the parent objects. If the particular...

    --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: Why “3653.0 and 36524.0”?

    Ed Wagner (12/9/2014)


    Jeff doesn't hit people with RBAR, he actively campaigns against it. High-velocity pork chops, on the other hand, are fair game. 😀

    Hmmmm... maybe butterfly stuffing the pork...

    --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: Why “3653.0 and 36524.0”?

    jshahan (12/9/2014)


    The code exploits what many consider to be a "fault" of the date/time data-types. If you present the functions with a 4 character number, T-SQL will treat it as...

    --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: Load Folder name and Images into SQL Tables

    Ok, here we go.

    First, we need a couple of functions to make our lives easier. This first one is a modification of the DelimitedSplit8K function that I've been working...

    --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,246 through 22,260 (of 59,098 total)