Forum Replies Created

Viewing 15 posts - 61 through 75 (of 430 total)

  • RE: Using dynamic sql, how can I rearrange columns

    There is a table called #T1 in sys.tables. How can I drop it from tempdb?

    name
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T__________________________________________________________________________________________________________________00000000250F
    #T1_________________________________________________________________________________________________________________000000001E45

  • RE: Using dynamic sql, how can I rearrange columns

    Each poa and diag has a number at the end. Take a peek at this section of code from the sp. The source data always has included, a DiagnosisUrnID that...

  • RE: Using dynamic sql, how can I rearrange columns

    Sorry. I copied, pasted and ran your code. This error popped up.

    I ran the query inside the CTE like this................

    SELECT

    col

  • RE: Using dynamic sql, how can I rearrange columns

    Msg 245, Level 16, State 1, Line 4

    Conversion failed when converting the nvarchar value 'poa' to data type int.

  • RE: Using dynamic sql, how can I rearrange columns

    The sample data only includes the diags and poa. It does not include all the demographic data. I think I can piece things together, if I can get a solution...

  • RE: Using dynamic sql, how can I rearrange columns

    Yes. That's correct.

  • RE: Using dynamic sql, how can I rearrange columns

    I don't have an option to limit the number of diags. I pleaded that case a while ago.
    So, with the help of you folks on a separate post,...

  • RE: How to handle very large dataset

    I got some more information from the owner of the table and was able to reduce the number of records and stick them in a temporary table. Then, join the temp...

  • RE: How to handle very large dataset

    I appologize for the confusion. I'm trying to get some financial data to tie out and I can't get out of this rat hole. The data is indexed on MRN,...

  • RE: How to handle very large dataset

    See attached.

  • RE: How to handle very large dataset

    Pardon my ignorance but, how do I copy then paste the execution plan?

  • RE: How to handle very large dataset

    I know how to find the most recent records, see my query, but it's wicked slow because of the number of records. I would have to send a few million rows...

  • RE: How to use dynamic pivot on this data

    Jeff Moden - Sunday, February 4, 2018 3:23 PM

    John Mitchell-245523 - Friday, February 2, 2018 8:52 AM

  • RE: How to use dynamic pivot on this data

    Jeff Moden - Sunday, February 4, 2018 3:41 PM

    NineIron - Friday, February 2, 2018 8:38 AM

    February 5, 2018 at 4:00 am

    #1978517

Viewing 15 posts - 61 through 75 (of 430 total)