Forum Replies Created

Viewing 15 posts - 8,281 through 8,295 (of 8,731 total)

  • RE: Suggestion to avoid Cursor

    Cadavre, is there a reason on why you didn't leave the condition as it was?

    Should we test the difference between yours and this?

    UPDATE fi

    SET fi.cor = 'Y', fi.tam =...

  • RE: Retrieve data between 2 '.'

    jdfletchr (10/26/2012)


    Try the Parsename function. Not what is was made for, but works quite well for what you need and is much faster that CharIndex and Len.

    Did you read...

  • RE: Why does my SUMFUNCTION doesn't work?

    That's because it's giving your results by groups, not the total.

    As you didn't post DDL or consumable sample data, here's an example that can help you to fix the query.

    DECLARE...

  • RE: Has anyone seen a naming convention like this?

    I've seen it before, had to use it and hated it completely.

    It was the worst database design I've ever seen.

    It's pointless and will cause problems trying to understand what the...

  • RE: Simple Select Table output (Pivot ?)

    I told you that was a start.

    What you need is dynamic code to include all columns needed.

    Have you read the articles?

  • RE: Max and Min Date problems

    I only found a problem with your query but it should throw an error and not incorrect results. The problem is the query is not complete.

    Could you post DDL?

    As a...

  • RE: Simple Select Table output (Pivot ?)

    Have you read Jeff Moden's articles on cross tabs and Dynamic cross tabs? Search them in this site.

    I don't remember if ROW_NUMBER is mentioned on the article, but this will...

  • RE: Retrieve data between 2 '.'

    Davin21 (10/25/2012)


    How about this?

    SELECT *

    FROM #testenvironment

    WHERE PARSENAME(CAST(yourdata AS NVARCHAR(MAX)),3) IS NULL

    I had the same idea, but I added an extra condition because your query will return results with no period...

  • RE: Retrieve data between 2 '.'

    I was so close, thanks to the QotD that made me remember the PARSENAME function.

    My code

    SELECT @HOLDER = ID

    FROM #testEnvironment

    WHERE PARSENAME( CAST(yourData AS NVARCHAR(MAX)),3) IS NULL

    AND PARSENAME(CAST(yourData AS NVARCHAR(MAX)), 2)...

  • RE: Group or sum date column (ATTLOG)

    But you're assuming that an identity column is available and that it has no gaps.

    You're assuming as well that the data is being inserted to the table in the correct...

  • RE: Calculating Yield

    kabaari (10/24/2012)


    Ok. I got the below to run. The formula returns weekly defects / overall production totals. I want to calculate weekly defect / weekly production. Is this possible?

    To help...

  • RE: Calculating Yield

    kabaari (10/24/2012)


    Below are my results:

    yield

    94.4000000000000000

    97.6000000000000000

    98.4000000000000000

    96.8000000000000000

    Now, I need to get rid of the zeros and show dates.

    You should do formatting on the front end.

    But if you must do it here, an...

  • RE: Urgent Query Help

    There's not much we can do without DDL and sample data.

    To audit the problem, you could do a simple select instead of the update.

    Another thing to watch is the datatype....

  • RE: Is there a Coalesce LIke function that returns the lowest/highest value of a set of params passed to it

    The Dixie Flatline (10/23/2012)


    p.s. I'm pretty sure that the presence of any NULL dates are going to throw a wrench into the gears.

    Agreed. One fix would be...

  • RE: Is there a Coalesce LIke function that returns the lowest/highest value of a set of params passed to it

    YSLGuru (10/23/2012)


    What tips form Jeff? I just see one poast saying there is no such native funcationailty. did I miss a post?

    No, I was referring to his article on...

Viewing 15 posts - 8,281 through 8,295 (of 8,731 total)