Forum Replies Created

Viewing 15 posts - 361 through 375 (of 428 total)

  • RE: How to construct a Select query from INFORMATION_SCHEMA.COLUMNS

    select stuff((

    select N', ' + cols.COLUMN_NAME as [text()]

    from INFORMATION_SCHEMA.COLUMNS cols

    Where cols.TABLE_NAME=...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Looking for user permission transfer Scripts from one SQL server to other

    I know, since they were created over 2 years ago, that I would probably implement parts of the scripts differently now (f.e. converting the password binaries into hex can probably...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Looking for user permission transfer Scripts from one SQL server to other

    I know, this was the only one I knew for sure where it was online. 🙂

    In the attachment is the complete set of scripts.

    - logins,

    - server permissions

    - server role members

    -...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: recursive cte question

    I had overlooked the contest comment (or better: I incorrectly interpreted the implications). Luckily I wasn't too complete in my answer :-D. Then again, all information you may need is...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Looking for user permission transfer Scripts from one SQL server to other

    Back in 2009 I created a set of scripts to generate T-SQL statements for all server and database principals and their rights from an existing server/database. The generated statements can...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: recursive cte question

    You've got a cross join in your cte.

    Change the recursive part like this and you're done:

    SELECT m.ID,

    DATEADD(dd,1,c.TheDATE),

    ...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Trying to report out non-standard symbols

    Ah, then that's a different problem than I assumed it was: I was thinking you wanted the "greater than" symbol in your output, but found that it got filtered out...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Trying to report out non-standard symbols

    The > is most likely exported by SQL server. It's probably one of the layers above that which filters the text from your output. You haven't however given us any...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Text to Columns in SQL

    Ok, a cross-tab implementation. It is faster and enables more possibilities than the Pivot implementation. Enough reasons to choose the cross-tab version. Even though I personally don't share the ideas...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Text to Columns in SQL

    You're looking for the "pivot" operator:

    SELECT t.*

    ,x.*

    FROM PS_TestForOnline t

    CROSS APPLY (

    select pvt.[1]

    ,pvt.[2]

    ...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Need help converting Infix expressions into Reverse Polish Notation (RPN)

    Hi SwePeso,

    Unless something drastic happens, this will be my last posting in this topic. I found and fixed a bug in the precedence detection and to my surprise your...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Need help converting Infix expressions into Reverse Polish Notation (RPN)

    Thanks a lot Peso, I'll have a look at your "pattern-approach". My initial impression though is that it will not work when we encounter other expressions like for example a.col1...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Need help converting Infix expressions into Reverse Polish Notation (RPN)

    I am not completely sure yet that I understand you correctly. Are you saying that there is another algorithm, producing slightly different RPN expressions -but still valid RPN-, which evaluate...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Need help converting Infix expressions into Reverse Polish Notation (RPN)

    Hi SwePeso,

    Thanks for the response, but I don't yet see how that helps me?

    I think it doesn't help me because your RPN representation is not exactly the same expression any...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

  • RE: Display records only if they have multiple child records

    Searching for rows for which more than one with the same value exists by using a "having count() > 1" is going to be slower the bigger your data set...



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?

Viewing 15 posts - 361 through 375 (of 428 total)