Forum Replies Created

Viewing 15 posts - 1,786 through 1,800 (of 4,085 total)

  • RE: Need help converting Rows to Columns

    You haven't addressed any of the points that I raised in my response, so it still isn't clear exactly what you are trying to do.  Giving you a solution would...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL code for the below 2

    Kingston Dhasian - Thursday, March 23, 2017 3:25 AM

    If the following assumptions are true, the code below should help
    1. You have...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: displaying 2 values when field same

    The CREATE TABLE is in there to create the sample data.  PERIOD.  Since you would be using the live data, you don't need to create the sample data, so you...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Need help converting Rows to Columns

    No, because a complete solution would violate 1NF, which is not allowed in SQL Server.  (All records must have the same number of fields.)

    Second, you haven't specified the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Performance Tuning

    It would help if you posted the query as well.  The SQL Plan does contain some of the query text, but it gets truncated.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Join Tables

    A LEFT OUTER JOIN should have worked.  Can you post your query and we can figure out what you did wrong?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Eliminates the look of dark circles

    Reported as spam.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: http://bodyprohealth.com/lorevive/

    Reported as spam.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to fail third record forcebily when inserting into table.

    A 547 error is a Foreign Key Violation.  You're trying to insert a value in your table that references a record in another table, but the other table doesn't contain...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Alter colum datatype dynamically

    Please don't create multiple threads for the same topic.  It fragments the conversation.   https://www.sqlservercentral.com/Forums/1865681/Alter-datatype-in-multiple-colums

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to fail third record forcebily when inserting into table.

    Generally INSERTs are done as a SET and the INSERT would succeed or fail as a whole.

    If you just want to test your error handling, use a THROW...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Old Query that I dont quite understand

    Budd - Friday, March 17, 2017 10:33 AM

    Budd - Friday, March 17, 2017 10:15 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Old Query that I dont quite understand

    It will never return any rows, because a record will always match itself, so the COUNT() will always be at least 1 (assuming that Tbl1.ID is not nullable).  Assuming that...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: EXISTS or NOT EXISTS function

    The standard way to return one row from a group based on a priority is to use ROW_NUMBER.

    ;
    WITH CTE AS
    (
        SELECT
            N.PARENTACCOUNT,
            n.TYPE,
            n.Street,

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Auto increment Foreign Key Column in sql

    A foreign key is a link to a specific record in another table  (or another record in the same table).  Creating a foreign key field that is auto-incrementing would create...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 1,786 through 1,800 (of 4,085 total)