Forum Replies Created

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

  • RE: Summarize Results from two tables, using one query.

    You have to be careful with the joins, if either of the tables has a one-to-many relationship. You could potentially be double-counting some of the records I would use...

  • RE: help with datediff for hours

    memostone86 (10/11/2011)


    Thank you so much Toddasd, it works great

    Actually, it doesn't work correctly. It assumes that there is only one change in the power status for each VM in...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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 :...

  • 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...

  • 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...

  • 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...

  • 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...

  • 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)...

  • 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

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