Forum Replies Created

Viewing 15 posts - 1,621 through 1,635 (of 4,085 total)

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor - Saturday, September 2, 2017 11:04 AM

    drew.allen - Friday, September 1, 2017...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Zero to Many relationship

    Sioban Krzywicki - Friday, September 1, 2017 2:05 PM

    The child information gets created first as it is configuration data. Parent records might...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Zero to Many relationship

    By definition, a relationship connects two or more objects.  That means that you have to have at least one object on each side of the relationship, which means that you...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to get Leader Boards (Rank) detail.

    This only takes one scan of the table whereas the other two solutions require two.

    ;
    WITH leaderboard AS
    (
        select
            ROW_NUMBER() OVER (order by Value desc)...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    Steve Jones - SSC Editor - Friday, September 1, 2017 9:52 AM

    There's too much JS in the editor. Trying to get the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: date fillers - dates in two rows

    Jeff Moden - Friday, September 1, 2017 8:15 AM

    drew.allen - Thursday, August 31, 2017 10:02 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to categorise my customer last 3 year , 2 year and 1 year not billed?

    Avi1 - Thursday, August 31, 2017 2:41 PM

    You need to provide data, script and output expected.
    Looks like you need case statement. 
    [code...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: date fillers - dates in two rows

    Hello Drew,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Came across something I haven't seen before today. . .

    Since a table represents a set, an empty table represents the empty set { }, so the value of any aggregate is either NULL or zero.

    GROUP BY defines...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: date fillers - dates in two rows

    First, sample data should be provided as an INSERT statement into your sample table.

    The solution below uses a tally table.  There is a blazing fast inline table-valued function...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Finding Consecutive Values For a Record

    Luis Cazares - Wednesday, August 30, 2017 1:00 PM

    drew.allen - Wednesday, August 30, 2017 12:16 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Determine Monday of next month and Monday of next week

    If I understand what you want.  This will give it to you.

    SELECT TOP 1 firstMonday
    FROM
    (
        VALUES
            (0, CAST(DATEADD(MONTH, DATEDIFF(MONTH, 6, GETDATE()), 6) AS DATE))
        ,    (1,...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Finding Consecutive Values For a Record

    Here is another solution.

    SELECT ID,
    (PATINDEX('%1%',(
        SELECT
            CAST([2017_07] AS BIT)
        ,    CAST([2017_06] AS BIT)
        ,    CAST([2017_05] AS BIT)
        ,    CAST([2017_04] AS BIT)
        ,    CAST([2017_03] AS BIT)
        ,    CAST([2017_02] AS BIT)
        ,    CAST([2017_01]...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Any tool/query to extract table list from a complex query

    If it's available, you can easily shred the XML query plan for the SQL statement to find any referenced tables.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Importing data reports data truncation in both EM and SSIS from multiple data sources

    Have you checked the end-of-record delimiter.  It could be LF, CR, or CR/LF.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 1,621 through 1,635 (of 4,085 total)