Forum Replies Created

Viewing 15 posts - 3,556 through 3,570 (of 4,085 total)

  • RE: Help with Pivot

    The most likely reason is that your interim result set has a column that is not being pivoted on nor in the final select list. PIVOT groups by ALL...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Dynamically select flatfiles depending on file date

    Your approach is fraught with problems. For example, what if the load fails on a Friday and you're trying to load it on a Monday? Yesterday's filename will...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: agregate join

    bkubicek (10/11/2011)


    I am not sure how you could get the min value from the outer join using a having clause.

    You seem to be joining to the same table over and...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Precedence Constarint

    By default, an Execute SQL Task only returns success/failure information to the package. If you want to use the output of a result set, you need to specify the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Row Numbering using Partion By

    Your PARTITION BY is wrong. You want the last record for each Service_Tag, so the PARTITION BY should just be on the Service_Tag, and not on the Service_Tag, Employee_ID...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: What makes stored procedure results not bookmarkable

    This is just a guess, but it probably needs consistent resultsets. That would mean no IF statements, no dynamic SQL, etc. In this particular example, you can replace...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL Improvement

    Performace Guard (Shehap) (10/7/2011)


    By this way , you have concluded the coding enhancement part , so what is next is the indexing enhancement part by implementing the below index :...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Adding either a "1" or "2" in a column (using Select, Union All, and three tables)

    Now that you mention it, my trigger actually did the reverse. The person who designed one of the tables didn't normalize it properly. The trigger I wrote created...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: What makes stored procedure results not bookmarkable

    I'm not sure that this is a T-SQL issue. You may have better luck posting in a forum for the application/language that you are working with. I did...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: which trigger event

    GilaMonster (10/6/2011)


    Read up on the UPDATED() and COLUMNS_UPDATED () functions.

    When doing UPDATEs, you should be aware that UPDATED() does not necessarily mean CHANGED. It simply means that a...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL Improvement

    I don't think so, because of the following condition "clsdt_date = wrkcpl_date".

    You can't do an index seek on cssdt_date until you know the values for wrkcpl_date. You can't do...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: updatetext help

    You're mixing the syntax for UPDATE and UPDATETEXT. You need to use one or the other.

    text fields are being deprecated. You should consider changing it to a varchar(max)...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating Incorrect Times from Two Tables without RBAR

    kramaswamy (10/6/2011)


    That one unfortunately gives me a result of 92 minutes, while the actual result should be 62 minutes.

    I'm getting 62 minutes. Which set of data are you using?

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating Incorrect Times from Two Tables without RBAR

    Here is code that gives the correct result for your sample data. From there, you should be able to figure out a way to optimize it.

    ;WITH PlannedWork AS (

    SELECT...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Calculating Incorrect Times from Two Tables without RBAR

    I'm going to throw a wrench in the works. All of your data has had roughly equivalent start and end times for the planned and actual data. Suppose...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,556 through 3,570 (of 4,085 total)