Forum Replies Created

Viewing 15 posts - 1,126 through 1,140 (of 4,085 total)

  • RE: Convert horizontal table to vertical in Sql

    ShawnBryan - Monday, July 23, 2018 10:33 AM

    I have the following table format:

    need to convert this table to following...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Pivot the data

    You've been around long enough to know that's not the way to post sample data and expected results.  If you need a refresher, look in my signature.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Update table using inner join

    emcardle01 - Sunday, July 22, 2018 4:25 PM

    I was able to recreate this issue when one or both of the join criteria...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: SQL Syntax HELP on merging enrollment spans

    000I notice you sidestepped the question about the two temp tables.  Here is a method.  The first CTE is simply to combine your two temp tables into one.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Update table using inner join

    Phil Parkin - Friday, July 20, 2018 5:10 AM

    Shaykh - Friday, July 20, 2018 4:39 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to GROUP BY XML coloumn

    You can't group by an XML column.  The best that you can do is convert it to a (N)(VAR)CHAR column, which you can group by.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Update table using inner join

    Phil Parkin - Thursday, July 19, 2018 12:08 PM

    That LEFT JOIN is potentially a problem. For the rows in supplierpack which have no...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: LEFT JOIN with CASE subquery ?

    I think that the problem is that you are expecting NULL = NULL to be true when it's actually UNKNOWN.  I think what you want for the final join is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Who Likes NULL?

    Zidar - Tuesday, July 17, 2018 3:23 PM

    Proposition = a declarative sentence S, for which we can ask "Is it true the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Who Likes NULL?

    Dennis Q Miller - Monday, July 16, 2018 8:50 PM

    I provided an example of how to get rid of NULL; re-introducing...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: how can i get the top 3, after i count the column ?

    BONITO - Monday, July 16, 2018 7:42 AM

    drew.allen - Monday, July 16, 2018 7:29 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Who Likes NULL?

    Dennis Q Miller - Sunday, July 15, 2018 9:10 AM

    Consider this EMPLOYEE, non-example which attempts to represent an unknown date with...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: how can i get the top 3, after i count the column ?

    BONITO - Monday, July 16, 2018 6:57 AM

    select top 3 count(UUT_SN) as Total_Fail,Fail_Description,Station_No from Test_table
    WHERE SQLDateTime >= '2018-07-01' 
    AND SQLDateTime <=...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Track Changes in a table on multiple columns

    I think you're looking for something like this.

    WITH data_compare AS
    (
     SELECT *
     , LAG(merchantname) OVER(PARTITION BY merchantnumber ORDER BY rec_start_date) AS prev_merchant_name
     , LAG(activeflag) OVER(PARTITION BY merchantnumber...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Who Likes NULL?

    Dennis Q Miller - Friday, July 13, 2018 12:30 PM

    I couldn't agree more.  We debate incessantly about how to represent "unknown"...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 1,126 through 1,140 (of 4,085 total)