Forum Replies Created

Viewing 7 posts - 5,671 through 5,678 (of 5,678 total)

  • RE: Script for adding roles

    Not entirely sure about a scripted method, but a brutish force way to deal with it is to just add the windows groups as if they were windows users, give...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Parameterize a query with a set of possible values

    In general you'd usually create a function that would break your comma delimited string down into a table for usage. For a local SQL Server Central example: http://www.sqlservercentral.com/scripts/Miscellaneous/31913/

    From there,...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: How can I show just the name only once?

    Sim, is the data actually stored in the way you listed the entry in the first code snippet above, where only one row carries the name and the next x...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Looking for more elegant solution for date identification mechanic

    Fair enough, and good links, thanks. You make a good point. So, to wit:

    create table #tmp

    (RepeatIDINT,

    BeginDateDATETIME,

    RecurEveryNumMonthsINT

    )

    INSERT INTO #tmp VALUES ( 1, '4/5/2001',3)

    INSERT INTO #tmp VALUES ( 2, '8/25/2005',6)

    INSERT...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Records with 2 dates 48 hours from each other

    This recent article:

    Linking To Previous Row

    If you're in 2k5 or greater, this is an elegant solution to your self referencing issues.

    [edit] Sorry, wrong section for that solution. [/edit]


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Looking for more elegant solution for date identification mechanic

    Rats, I'd hoped someone was going to come back with a way to do it by days that didn't end up tripping on the leap year for multiple year scenarios....


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • RE: Looking for more elegant solution for date identification mechanic

    I did find my own answer, but I'd love to find a more elegent solution.

    The code:

    dateadd( mm,

    ( datediff( mm, BeginDate, getdate()) - CASE WHEN datepart(dd, BeginDate) > datepart(dd,getdate()) then...


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

Viewing 7 posts - 5,671 through 5,678 (of 5,678 total)