Forum Replies Created

Viewing 15 posts - 4,696 through 4,710 (of 5,678 total)

  • RE: help with use of tally table and sales data.

    So, if I'm correct, you want the output from this:

    SELECT

    t.yrm,

    s.sales,

    s.part

    FROM

    testtally AS t

    LEFT JOIN

    testsales AS s

    ONt.yrm = s.yrm

    order by

    t.yrm,

    s.part

    which looks like this:

    yrm sales...


    - 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 to run 2 queries every month

    jayoub1 (12/7/2010)


    Thanks for your reply

    So you are saying that i would create an SQL agent job to run on the first of every month and put the query in the...


    - 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: Alter View from Trigger Hangs

    drew.allen (12/7/2010)


    Craig Farrell (12/7/2010)


    drew.allen (12/7/2010)


    I was trying to do the same thing and ran into the same problem. The cause was a GO statement that I included in my...


    - 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: help with use of tally table and sales data.

    I'm not entirely sure what a Tally Table has to do with this, but can you post some sample data from the two tables to help illustrate the exact data...


    - 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: System performance limitations

    SQL33 (12/7/2010)


    Is there a means to analyze the output from say a syslog output and determine the optimum data type and size the target SQL table fields should be?

    That I'm...


    - 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: Spreading out record over a date range to be analyzed on a day by day basis

    loki1049 (12/7/2010)


    Ah great thanks, thats just want I was looking for. Cuts the run time down from 24 sec to 8 sec. Thats a good start.

    And what do you mean...


    - 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: Spreading out record over a date range to be analyzed on a day by day basis

    Add this line to your where clause:

    AND cteTally.N <= DATEDIFF( dd, Temp.Date1NoTime, Temp.Date2NoTime)

    This will restrict the crossjoin to just the # of Tally records you require.

    FYI: the code above loses...


    - 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: Group Islands of Contiguous Dates (SQL Spackle)

    RStarr, while your code seems functional (I didn't extensively test it), take a look at the million row test.

    If you look near the bottom of the article, Jeff gives a...


    - 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: Select * from the result of store procedure

    What you're looking for is:

    Insert Into #table EXEC sp_proc


    - 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 to run 2 queries every month

    Don't think we'll need the full query for this Jay.

    You've got a two step process here that you're dealing with. First, you want to get rid of the need...


    - 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: System performance limitations

    SQL33 (12/7/2010)


    When setting up indexing, is it limited by the selected field size property settings? If so, can I downsize the fieldsize properties to enable more fields being included...


    - 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: System performance limitations

    27 million rows on what appears to be a single drive spindle desktop server? 1 Gig is barely enough to hold Windows in memory these days. 🙂

    At a guess,...


    - 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: Alter View from Trigger Hangs

    drew.allen (12/7/2010)


    I was trying to do the same thing and ran into the same problem. The cause was a GO statement that I included in my dynamic SQL. ...


    - 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: Store Procedure inside the Package is running slow

    sharath.chalamgari (12/7/2010)


    My Execute sql task is having one store procedure along with some sql statemetns in the sql query. when we run the package it is taking more time...


    - 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: Query not showing needed results

    This isn't too bad, but you just need to wrap an override on the first column with a case statement so that when it's over 40 hours you simply show...


    - 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 15 posts - 4,696 through 4,710 (of 5,678 total)