Forum Replies Created

Viewing 15 posts - 3,391 through 3,405 (of 4,085 total)

  • RE: Must be a better way?

    If I understood what you're trying to do, this is a more efficient approach.

    SELECT n.[ID], n.DisplayTime, n.NEText, c.Other_ID

    FROM @Case2 AS c

    CROSS APPLY (

    SELECT TOP (1) n.ID, n.DisplayTime, n.NEText

    FROM @Notes AS...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Format a Percentage

    The problem occurs because of how the precision and scale of the result are determined from the precision and scale of the operand expressions. Check Precision, Scale, and Length...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Order by in stored procedure

    GSquared (12/28/2011)


    I'd prefer to see the query that gets a syntax error, and fix that first, and then worry about optimization and standardization next.

    I don't think it's that easy to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Order by in stored procedure

    There may not be syntax errors, but there are lots of logical errors. For instance, the table clean_cust_account_lcd_cancel_switch is queried three separate times when it looks like it should...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Split comma separate single row into multiple rows

    Jeff Moden has an article on this very subject. String Splitter[/url]

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Data Spliting

    pdharmaraju (12/28/2011)


    use the loop and insert into new table

    It has been shown repeatedly that the loop performs much worse than the string splitter that was linked to previously in this...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Complex Join (?) problem

    The problem with this query is that the order of the UOMs is not meaningful. It just happens that the UOM for capacity comes before the UOM for weight...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Complex Join (?) problem

    stourault (12/22/2011)


    Also, I apologize, but I seem to have lost the formatting of the results set that I put in the post, I'm trying to figure out how to show...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Help Finding Cumulative Daily Totals

    Jeff Moden has a very good article on exactly this problem. Solving the Running Total and Ordinal Rank Problems (Rewritten)[/url] Be sure that you follow all of the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Creating partially matched datasets

    Use NTILE() to divide each partition into two parts (control and experimental) and then use ROW_NUMBER() to assign a number to each record within the group and match corresponding numbers....

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Converting Rows into Columns

    angela.nira (12/22/2011)


    Is there an easy way? Any help you could provide would be greatly appreciated.

    We're all unpaid volunteers. We're more than willing to help as long as you've...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL server 2005 and crystal report

    senthil_sn1 (12/22/2011)


    In ODBC the SQL language is English. The Regional settings is Japanese. This is settings in workstation. In the database server the regional settings is English

    This goes back to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Really Odd and Seemingly Difficult Update, One Piece of Data at a Time.

    ChrisM@home (12/21/2011)


    Secondly, use COALESCE(ExistingColumn, StagingColumn) like this to handle the NULL issue:

    ExistingColumn = COALESCE(ExistingColumn, StagingColumn)

    Actually it sounds like he wants to overwrite the existing column if both the existing and...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: HTML using XML PATH

    The problem is this line here:

    CAST ( ( SELECT td='<a href=''http://ABC:7777/XYZ/TYPE/EditForm.aspx?ID=0&UID='''+CAST(ACTIVITY_UID AS VARCHAR(36))+'''''>'+ACTIVITY_NAME+'</a>','',

    Because you have given it an alias ("td") it treats the data as text instead of XML....

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Dropped Column Name resolution..

    ulteriorm (12/20/2011)


    I suspect the bind phase of query execution is trying to resolve the stores table data, and since it could not find the Info column, it threw an error.

    This...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,391 through 3,405 (of 4,085 total)