Forum Replies Created

Viewing 15 posts - 2,656 through 2,670 (of 4,087 total)

  • RE: Can we reduce the spam?

    Would it be possible to limit posts based on the number of visits? I noticed that most of the spam comes from people with 1 or 2 visits. ...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (5/18/2016)


    Love OPs that change the requirements midstream. Show things as calendar year, then suddenly it needs to be fiscal year. Big difference in how things are...

  • RE: YEAR TO DATE DATA

    The data provided only has data for 2013-12 and 2014-01, so there is only one month in the "current" year, which is why you are only getting one row. ...

  • RE: Totals question

    yb751 (5/18/2016)


    Ok, back from my meeting and thanks to Lowell's for the CTE.

    ;WITH MyOriginalTable([TransactionID],[LineItemNumber],[Amount])

    AS

    (

    SELECT 1,1,1.00 UNION ALL

    SELECT 2,1,2.00 UNION ALL

    SELECT 2,2,3.00 UNION ALL

    SELECT 2,3,1.00 UNION ALL

    SELECT 3,1,4.00 UNION ALL

    SELECT 3,2,3.00...

  • RE: Is COLLATE able to sort for line break characters?

    There are four options associated with (non-binary) collations

  • case sensitivity
  • accent sensitivity
  • kana sensitivity
  • width sensitivity
  • To the best of my knowledge, carriage return and line feed do not have alternate representations that differ on...

  • RE: Stairway to T-SQL Part 2: Beyond T-SQL Basics: Level 2: Writing Subqueries

    The answer to question 1 should be "None of the above." By definition, a correlated subquery is a subquery. Since none of the answers applies to ALL subqueries,...

  • RE: Except

    Ken Wymore (5/18/2016)


    Isn't this exactly the same as NOT EXISTS? Is there a reason to use one method over the other?

    I rewrote the query using not exists and got the...

  • RE: YEAR TO DATE DATA

    smer (5/18/2016)


    HI Experts

    The below query works on year to month ... works good but i am unable to control the date . E.g my year to date is...

  • RE: Using CTE Common table expressions with SELECT CASE statement

    rivcomp (5/17/2016)


    Veteran,

    this is probably not the best way to use a CTE, a CTE is means to be re-usable across the T-SQL query and it is not meant to switch...

  • RE: Parsing XML Data - ParentChildren

    Try changing your CROSS APPLY to an OUTER APPLY. The CROSS APPLY filters out nodes that don't have any instances of the element specified, whereas the OUTER APPLY will...

  • RE: The SQL Saturday Thread

    Ray K (5/17/2016)


    drew.allen (5/17/2016)


    I'm going to be at SQL Saturday 517 - Philadelphia. I know that WayneS is planning to be there, because he's scheduled to present.

    Drew

    I'm presenting there...

  • RE: summary query for difference between rows and %

    Look at Jeff Moden's article on Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs[/url]. You may need to read Part 1[/url] first.

    Drew

  • RE: The SQL Saturday Thread

    I'm going to be at SQL Saturday 517 - Philadelphia. I know that WayneS is planning to be there, because he's scheduled to present.

    Drew

  • RE: Parsing XML Data - ParentChildren

    Two things:

    1) You said that you were missing data? What results are you getting?

    2) You xml data doesn't support the desired results. Your desired results are...

  • RE: How to update multiple rows based on inserted records

    You don't want to store the amount remaining, you want to calculate it on the fly using the windowed version of SUM(). Of course, your data is missing the...

  • Viewing 15 posts - 2,656 through 2,670 (of 4,087 total)