Forum Replies Created

Viewing 13 posts - 271 through 283 (of 283 total)

  • RE: Joining data from two tables to another

    Try this code and see if it works for you:

    select m.id, m.letter, m.data1, coalesce(c1.letter, c2.letter), coalesce(c1.data1, c2.data1)

    from @Mother m

    left join @child1 c1 on c1.letter = m.Letter

    ...

  • RE: SQL to do calc on different rows

    This gives you the output that you specified:

    with cte as

    (

    Select c1, c2,

    Row_Number() over(ORDER BY c1) as RowNum

    from...

  • RE: Joining two tables: Provided/Budget

    Do you have a desired output table that matches the data you provided?

  • RE: Joining two tables: Provided/Budget

    ChildID WAIVER_SERVICES Month/Year services_provided Budget % used

    10177 3 12/2012 ...

  • RE: Missing Posts and Threads

    Steve Jones - SSC Editor (8/6/2013)


    I don't see it in a search in the database. My guess is someone spammed it and the thread got deleted instead of the spam...

  • RE: Missing Posts and Threads

    Steve Jones - SSC Editor (8/6/2013)


    Was it this thread? http://www.sqlservercentral.com/Forums/Topic1481256-392-1.aspx

    No. That is a different thread!

    I don't have a title, but I believe the word Touchdown was part of the title....

  • RE: Missing Posts and Threads

    The other thread that I posted to that I cannot find had to do with a query that would return the quarterback name and their max touchdowns and the year...

  • RE: Missing Posts and Threads

    All I have is the link that I referenced in my earlier reply. It is a hyper link, so clicking on it should show you what I am seeing.

    I do...

  • RE: SQL Query help

    shani19831 (8/6/2013)


    Thanks for the query, its returning what i want, but i have never used CTE and have no knowledge of it, guess its time to learn.

    is there no easy...

  • RE: SQL CHOOSE

    We can assume, though, that since none of the answers were "doesn't work in this version of SQL", that we would be using a version of SQL that...

  • RE: How to clean up my master database?

    You can try the following:

    use master

    EXEC sp_MSforeachtable 'DROP TABLE ?'

    But be very careful!!! I tested this on a test server and it did get rid of tables that had accumulated...

  • RE: Help needed for Select Query

    Notice any problem between the Customer table & the Customer Details table?

    As was stated earlier, what you have tried, correctly formatted DLL & insert statements are necessary to even begin.


    TableName:Customer

    ---------------------------------------------------------------------------------

    CustomerIdCustomerNameLocationCityDistrictPinCode...

  • RE: SQL to combine rows based on dates and other common factors

    Here is another possible solution using cte's. While it makes seeing what the query does a bit easier, they are usually not as efficient as a solution without one!

    ;with cte...

Viewing 13 posts - 271 through 283 (of 283 total)