Forum Replies Created

Viewing 15 posts - 1,246 through 1,260 (of 4,085 total)

  • RE: Querying against a multi-ID/Value table

    thinkink07 - Monday, February 12, 2018 2:58 PM

    I'm wanting a count of Param to get the number that meet the criteria. Your...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Querying against a multi-ID/Value table

    thinkink07 - Monday, February 12, 2018 1:27 PM

    drew.allen - Monday, February 12, 2018 12:24 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: how to find all stored procs using a table, but ignore comments?

    SELECT *
    FROM sys.dm_sql_referencing_entities(<YourTableNameHere>, 'OBJECT')

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Querying against a multi-ID/Value table

    thinkink07 - Monday, February 12, 2018 1:27 PM

    drew.allen - Monday, February 12, 2018 12:24 PM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Grouping dates and IDs together

    I think this captures everything.

    ;
    WITH DeliverySites AS
    (
        SELECT *,
            STUFF(
                (
                    SELECT ',', DeliverySite AS [text()]
                    FROM #MyTemp sub
                    WHERE main.POID = sub.POID
                    ORDER...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Querying against a multi-ID/Value table

    Instead of doing a crosstab/pivot, you can also just use a HAVING clause with the correct criteria.


    SELECT [Param]
    FROM #mytable
    GROUP BY [Param]
    HAVING MAX(CASE...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Today's Random Word!

    Ed Wagner - Monday, February 12, 2018 11:49 AM

    Ray K - Monday, February 12, 2018 10:02 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Grouping dates and IDs together

    Brandie Tarvin - Monday, February 12, 2018 11:46 AM

    BAH. I thought I was through with this, but I just found an outlier.

    When...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Querying against a multi-ID/Value table

    This looks like an EAV table.  Storing things in an EAV table makes it much harder to query.  You can use Cross Tabs and Pivots to change...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    Ed Wagner - Monday, February 12, 2018 10:00 AM

    Eirikur Eiriksson - Monday, February 12, 2018 9:45 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    Eirikur Eiriksson - Monday, February 12, 2018 9:45 AM

    drew.allen - Monday, February 12, 2018 9:26 AM

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    drew.allen - Monday, February 12, 2018 9:24 AM

    Another example of people not supplying nearly enough information.  I got an email from someone...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Are the posted questions getting worse?

    Another example of people not supplying nearly enough information.  I got an email from someone saying that I met the qualifications for a job at their company and wanting to...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Count from joins

    Use a CASE expression.

    select DEP_Code, DEP_Name, cast(0 as bit) Favourite,
      case
      when DEP_Code = 'ACHR' then 7
      when DEP_Code = 'IT' then 8

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Setting a Flag when a set of conditions meet

    noel.moore - Friday, February 9, 2018 8:27 PM

    Thank you.  Certainly a step forward!   I still have an error---
    with 3 variations, I...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 1,246 through 1,260 (of 4,085 total)