Forum Replies Created

Viewing 15 posts - 37,051 through 37,065 (of 59,072 total)

  • RE: sql

    Brian O'Leary (8/28/2010)


    I forgot to add, I believe the nvarchar(max) is roughly 2GB

    Look it up in Books online where you'll find that although it contains a binary 2GB, it will...

    --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: Pivot w/o aggregation...query not working

    You're simple trying to do too much all at once. Do the pivot first... then display it and the other information. It's called "pre-aggregation" (thanks Peter Larsson) 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: 8KB page size

    Heh... nah... I thought I made a mistake but I was... ummm.. mistaken. 🙂

    The mistake is in BOL. They claim that there are 8096 bytes per row in that...

    --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: 8KB page size

    CirquedeSQLeil (8/28/2010)


    Thanks Jeff for outlining it so well.

    I may have made a slight mistake but the end result is the same. Let me figure out the mistake.

    --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: 8KB page size

    Gopinath Srirangan (8/28/2010)


    Hi,

    I am creating a table of row size char(1000) as below.

    create table Optimised(id char(1000))

    i am insert values 1,2,3,4.....

    insert into Optimised values('1')

    insert into Optimised values('2')

    insert into Optimised values('3')

    insert into...

    --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: Can splitting a database to several databses improve performance.

    CirquedeSQLeil (8/28/2010)


    I would start with finding where the pain points in the app and database are. Once those have been identified, I would optimize the database (indexes, keys, constraints)...

    --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: Can splitting a database to several databses improve performance.

    ahmed.net (8/28/2010)


    Thanks Jason

    So what should i do??

    im confused.....!:unsure:

    This isn't meant to be as nasty as it's going to sound... my recommendation would be do get some design help. Get...

    --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: getting the sum

    PaulB-TheOneAndOnly (8/28/2010)


    cpinky01 (8/28/2010)


    I have sales type and under which i have

    sales for diff products

    and Calims under which i have different types of claims

    like this:

    1.Sales

    a. ...

    --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: recursive or a better way to solve this problem

    WayneS (8/28/2010)


    thava (8/28/2010)


    this way is slow when i used a large amount of data so i want change it for that, i need a little explanation there, could 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: recursive or a better way to solve this problem

    thava (8/28/2010)


    sorry for the late reply

    Mark-101232 (8/24/2010)


    Try this

    SET DATEFORMAT YMD

    --Sample table

    DECLARE @TABLE AS TABLE(

    [RID] INT,

    [EMID] INT,

    [In Time] DATETIME,

    [Out Time] DATETIME)

    --Insert sample data

    INSERT INTO @TABLE

    SELECT 62, 12, '2005-08-18 06:02:00', '2005-08-18 06:31:00'

    UNION...

    --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 Tune Data Inserts

    WayneS (8/27/2010)


    I wouldn't worry about the insertion issue - SQL handles this pretty fast, and only on large tables with lots of data insertion/update/delete activity is this going to be...

    --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: XP_cmdshell DIR

    Ness (8/27/2010)


    Sorry Jeff - I was anticipating using a script task from within SSIS [font="Arial Black"]to get the info that you were after[/font]. It should be a relatively easy ...

    --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: To split comma delimiterd string

    Heh... glad I'm not the only one behind on my posts. 🙂

    Thanks again, Barry and good to "see" you again... you've been "hiding".

    --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: Running totals... in groups

    skcadavre (8/25/2010)


    I'd go with something like this: -

    ALTER TABLE #mytable ADD id INT IDENTITY;

    SELECT t.datecount

    ,t.outlet

    ,t.brand

    ...

    --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: concatenating columns

    Prema sambandam (8/25/2010)


    I have first name and last name in my table. I have to concatenate these two columns and update in other column. But if name appears...

    --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 - 37,051 through 37,065 (of 59,072 total)