Forum Replies Created

Viewing 15 posts - 2,431 through 2,445 (of 59,067 total)

  • Reply To: Issues with creating a foreign key

    I made idCategoria only on table categoria, I was gonna make an Alter Table on usuario for creating the foreign key, it means then that I need to create...

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

  • Reply To: Login attempt from different IPs in the errorlog

    @Raja mssql ,

    Nothing like giving would-be hackers an advantage.  I strongly recommend that you modify your original post to NOT include your IP addresses even though it's an older post. 

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

  • Reply To: Daily record count based on status allocation

    Taking a SWAG at what's desired, here's the "vertical" rendition using the given data.  I don't recommend Pivoting such data anywhere but a spreadsheet and I wouldn't do it there,...

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

  • Reply To: Daily record count based on status allocation

    milo1981 wrote:

    I have a table named Books and a table named Transfer with the following structure:

    CREATE TABLE Books
    (
    BookID int,
    Title varchar(150),
    PurchaseDate date,
    Bookstore varchar(150),
    City varchar(150)
    );

    INSERT INTO Books VALUES (1, 'Cujo', '2022-02-01', 'CentralPark1', 'New...

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

  • Reply To: hex conversion

    Ok... when you have a ModelNameID like this...

    000.001.002.000.0

    ... or like this...

    000.160.170.000.0

    ... what do you want to return?

    My thought is that it's a form of future computational suicide to drop 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)

  • Reply To: hex conversion

    HeftSteady wrote:

    I would like to pull the 1 and 46 from the 000.001.070.000.0 to return as 1.46 .

    I'm totally lost here... where do you see a "46" in the "000.001.070.000.0"...

    • This reply was modified 3 years, 6 months ago by Jeff Moden. Reason: NM. Figured it out

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

  • Reply To: Issues with creating a foreign key

    The error seems to indicate that the "idCategoria" column doesn't exist in one of the two tables.  Check each of the two tables to make sure that the column does...

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

  • Reply To: Introduction

    Thanks for the feedback.

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

  • Reply To: Hi Team

    Jeffrey Williams wrote:

    That all depends on the OP - and it isn't clear if they are looking for help with MySQL or converting from MySQL to SQL Server.  If they are...

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

  • Reply To: Challenging Yourself

    call.copse wrote:

    Jeff Moden wrote:

    ...

    Then I proved the unthinkable... I made the 99% fragmented index twice as slow by [insert drum roll here] defragmenting it!  That was a fortuitous accident that 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)

  • Reply To: Challenging Yourself

    I have to disagree a bit with the opening quote in the article.  My "wins" are learning episodes and so I'm always winning, not because I'm undershooting my potential, but...

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

  • Reply To: Hi Team

    I thought it was someone trying to convert some other dialect to SQL Server.  🙁  I wish people would declare things like that.  Offering help in MySQL isn't a problem...

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

  • Reply To: Hi Team

    ZZartin wrote:

    If you want just the month name, SELECT FORMAT(getdate(), 'MMMM')

    But ideally you would return the date as is and format it at display time.

    You don't want to do 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)

  • Reply To: Introduction

    In tha

    Alxender wrote:

    Thanks to all to welocome me. I hope , i'll gain more and more knowledge here.

    In that case... Do you know what a "Tally" or "Numbers" table or...

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

  • Reply To: Db is slow

    bobrooney.81 wrote:

    Hi SQL Gurus,

    One of our production database is running very slow. I checked blocking , I didn't see any blocking. Also, check for running processes and look for any...

    --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 - 2,431 through 2,445 (of 59,067 total)