Forum Replies Created

Viewing 15 posts - 26,356 through 26,370 (of 59,099 total)

  • RE: SQL Query

    vshiva2379 (7/28/2013)


    Thank you, But Sorry I didnt Get my result with that

    My table is

    Student

    StudentID int,

    name varchar(20),

    maths int,

    science int,

    comp int

    records are

    1, Allen, 60, 80,75

    2, John ,70,60,90

    3, Kim, 86,85, 80

    result...

    --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 Query

    Dird (7/28/2013)


    Do what Jeff said but replace

    PARTITION BY StudentName

    With

    PARTITION BY SubjectName

    I read it as wanting to know the best subject for each student hence the partitioning by StudentName. Partitioning...

    --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 Query

    vshiva2379 (7/27/2013)


    Hi all,

    suppose if we have student name, and subjects so we want student name and max marks scored subject for each student

    one student will be scored in maths,...

    --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: Who administers the SQL Backups in your company

    I guess I'd have to say the horse is already out of the barn on which backup software to use. That's a battle I wouldn't bother fighting.

    So far 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: Explanation of LIKE '%[0-9]%'?

    DataAnalyst011 (6/27/2013)


    From time to time I need to check if a column is completely numeric (or usually, check for the row contain something other than numeric). I've read the ISNUMERIC...

    --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: What's in your CLR?

    Wesley.Groleau (7/27/2013)


    For example, if the ROW (condition) then select col_A as @vrbl_X, col_B as @vrbl_Y

    else, select L, M, N, O, P, Q, ...V and arrange them into several lines of...

    --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: Accounting Database Design

    What is the difference between what you've designed the Accounts hold and a Bank Account?

    Also, why do you need to identify a "Primary Group" and why are you using 4...

    --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: Table Partitioning

    skpani (7/27/2013)


    GilaMonster..please make me clear with details..

    My recommendation would be to look up "Clustered Indexes" and "Non Clustered Indexes" in Books Online so that you'll at least be familiar with...

    --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: Concatenation

    koolme_85 (7/23/2013)


    Never mind i just got it worked

    Very cool. What did you do to fix 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: Concatenation

    iamsql1 (7/27/2013)


    Jeff Moden (7/27/2013)


    iamsql1 (7/26/2013)


    Use length and then substring funtionc

    It's easy to get to the moon. All you need to do is build a rocket ship. 😉

    How would 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: Find integer at end of a string. There *must* be a better solution ?

    The use of IsNumeric in onne of the solutions serves as a reminder that there are a whole lot of things that look like numbers to SQLServer. Here's some...

    --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 filter just numbers from varchar value?

    deepthipayal01 (7/27/2013)


    when i try to execute the below query it throws an error "Conversion failed when converting the varchar value '1131-' to

    data type int."

    SELECT dbo.fn_int_only('11AB31-A')

    but SELECT dbo.fn_int_only('11AB31') this...

    --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: A Simple Formula to Calculate the ISO Week Number

    SwePeso (7/27/2013)


    Yes, I did indeed. However, the time at my place was 3 am and time to go to bed...

    Here is a further reduced code (one less addition)(DATEPART(DAYOFYEAR, DATEADD(DAY, DATEDIFF(DAY,...

    --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: Table Partitioning

    Skpani (7/27/2013)


    Yes I understood that your Index size is 1Tb.But as per your question you have 14 indexes(if i am not wrong you must have 13 non clustered index 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: Concatenation

    iamsql1 (7/26/2013)


    Use length and then substring funtionc

    It's easy to get to the moon. All you need to do is build a rocket ship. 😉

    How would YOU use 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)

Viewing 15 posts - 26,356 through 26,370 (of 59,099 total)