Forum Replies Created

Viewing 15 posts - 1,396 through 1,410 (of 1,435 total)

  • RE: Computed Column that can be edit

    franklinkeith (5/25/2016)


    Trying to create a computed column that can be edit.

    LASTNAME + FIRSTNAME

    I'm trying to be able to edit the computed column (NICKNAME) = LASTNAME FIRSTNAME and change to...

  • RE: Make delete statement with 30 equalities more efficient

    What about adding a new derived column and index to each table that creates a hash across the 30 fields. Then do a compare of the hashes.

    ALTER TABLE <tablename>

    ADD...

  • RE: combination of data between two tables

    I don't agree with storing values as separated lists.

    But, to answer your question, I have made the assumption that TB_CongVan is the parent table, and cap2 is the child table.

    SELECT

    ...

  • RE: Which partition is my data on

    MadAdmin (4/28/2016)


    your partitioning function will tell you how the data is split.

    You can find that under storage in that dataase.

    Thanks MadAdmin

    I could use something like this

    SELECT mt.*, p.partition_number

    FROM MyTableName AS...

  • RE: Transfer large amounts of Data to an mdf

    You can always import it in batches

    1 - Insert a new column before "A". Add a UniqueKey to this column. It could be as simple as an incrementing...

  • RE: Need to dynamically add grouping based on username

    It's very difficult to attempt an answer without sample data and expected output.

    That said, perhaps this will do the trick

    SELECT src.*,

    TotalEntered = SUM(Entered) OVER (PARTITION BY USERNAME),

    ...

  • RE: Search Optomisation

    OK. So I have tweaked Scott's math and massaged it into a CROSS APPLY against the table to search for any partial PartNumber, regardless of length.

    The performance...

  • RE: Search Optomisation

    DesNorton (4/6/2016)


    ScottPletcher (4/6/2016)


    DesNorton (4/6/2016)

    Hi Scott

    This is certainly fast, with similar I/O to the other solutions, but very low CPU numbers. However, I am unable to wrap my head around...

  • RE: Search Optomisation

    ScottPletcher (4/6/2016)


    DesNorton (4/6/2016)

    Hi Scott

    This is certainly fast, with similar I/O to the other solutions, but very low CPU numbers. However, I am unable to wrap my head around the...

  • RE: Search Optomisation

    ScottPletcher (4/5/2016)


    Another possibility is to leave the main table alone, and create a separate table to hold the partial partids to match on. Use a trigger on the main...

  • RE: Search Optomisation

    Alan.B (4/5/2016)


    Now let's compare your query when the optimizer uses a clustered index to when a UNIQUE nonclustered index is available (if you run this with "include actual execution plan"...

  • RE: Search Optomisation

    Scott and Alan

    I have just walked into a #$@%storm that needs my full attention. I will take a closer look at your suggestions as soon as I can.

  • RE: Search Optomisation

    Sergiy (4/5/2016)


    DesNorton (4/5/2016)


    I have inherited a DB, and need to make some changes for a search proc.

    This app and DB are still in dev, and have not yet been published...

  • RE: Search Optomisation

    Alan.B (4/5/2016)


    Interesting dilemma and great work with the sample data/ddl!

    Quick question what are the Partnumber column always going to be 6 characters long or less?

    Also (and I expect...

  • RE: Search Optomisation

    Alan.B (4/5/2016)


    Interesting dilemma and great work with the sample data/ddl!

    Quick question what are the Partnumber column always going to be 6 characters long or less?

    Also (and I expect...

Viewing 15 posts - 1,396 through 1,410 (of 1,435 total)