Forum Replies Created

Viewing 15 posts - 2,146 through 2,160 (of 4,085 total)

  • RE: How to prevent having XMLNS added to each and every record?

    Have you tried adding a ROOT directive? That seems to remove most of the xmlns prefixes, but it may not give you the structure that you need.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: How to prevent having XMLNS added to each and every record?

    The xlmns is being included because you've specified the XSINIL directive. If you don't want it included, you'll have to get rid of the XSINIL directive.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Convert Cross Join to Inner Join

    RonMexico (11/23/2016)


    whenriksen -

    The example I provided is code for a report we are taking over from another group. The first goal is to convert it to ANSI-92 style joins...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: No data in one column of a view (NULL value instead

    As a quick test, I decided to compare doing a direct T-SQL CAST versus using XML to do the CAST. Also, the XML is essentially doing a double cast:...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query

    sqlfriends (11/23/2016)


    Thanks. This time I mean how to query the last 30 days not any rolling days using school calendar table?

    That is basic SQL. You should be able...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: No data in one column of a view (NULL value instead

    I have to ask WHY are you doing your conversions through XML?

    The problem is that column Y is in scientific notation, and the xml does not recognize scientific notation as...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query

    sqlfriends (11/23/2016)


    thank you. So far the last 30 days we consider it as calendar days similar like last month.

    But suppose I have a school calendar table, it looks like for...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Make Varchar the Default instead of NVarchar

    ETL is a process, not a tool. You'll need to let us know what tool you are using for your ETL process.

    SELECT *

    INTO TableName

    FROM SourceTable

    uses the same data types...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: RETRIEVE NEXT TIME VALUE FROM NEXT RECORD

    sharonmtowler (11/21/2016)


    THIS WORKED LIKE A CHARM !!

    It may have "worked" but it is likely to perform horribly. You should compare it to LEAD/LAG before settling on that as the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Multiple calls to MAX(datecolumn) in select

    CELKO (11/21/2016)


    Also the code you posted implies that you have bit flags in SQL. That was assembly language and has no place in this language.

    This language is T-SQL, not...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: RETRIEVE NEXT TIME VALUE FROM NEXT RECORD

    There are three issues that I see immediately.

    1) In your CTE, you do not provide an alias for the ROW_NUMBER() expression.

    2) You should be using LEAD/LAG instead of ROW_NUMBER() with...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    He didn't like the answers he got on his original thread, so he started another thread. I pointed out repeatedly that he already had the answer he was seeking...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Coalesce and ISNULL not grabbing columns with NULL

    The following two expressions are essentially equivalent.

    COALESCE (ISNULL(k.Application, ''), ISNULL(n.Application, ''))

    ISNULL(k.Application, '')

    COALESCE evaluates the expressions in order until it finds one that is not null or it runs out of...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: many years What was part

    Reported as spam.

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: will it call subquery for every row of table with distinct in subqyery.

    John Mitchell-245523 (11/17/2016)


    1. No, it's not a correlated subquery, so it only needs to run once.

    2. Same as 1.

    3. This is a correlated subquery. I'm not sure what your...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 2,146 through 2,160 (of 4,085 total)