Viewing 13 posts - 271 through 283 (of 283 total)
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
...
August 12, 2013 at 1:16 pm
This gives you the output that you specified:
with cte as
(
Select c1, c2,
Row_Number() over(ORDER BY c1) as RowNum
from...
August 11, 2013 at 12:56 am
Do you have a desired output table that matches the data you provided?
August 9, 2013 at 3:10 pm
ChildID WAIVER_SERVICES Month/Year services_provided Budget % used
10177 3 12/2012 ...
August 9, 2013 at 3:05 pm
Steve Jones - SSC Editor (8/6/2013)
August 6, 2013 at 3:49 pm
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....
August 6, 2013 at 3:03 pm
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...
August 6, 2013 at 11:46 am
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...
August 6, 2013 at 11:40 am
shani19831 (8/6/2013)
is there no easy...
August 6, 2013 at 10:31 am
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...
July 23, 2013 at 1:44 pm
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...
July 10, 2013 at 1:11 pm
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.
---------------------------------------------------------------------------------
CustomerIdCustomerNameLocationCityDistrictPinCode...
July 8, 2013 at 11:23 am
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...
July 4, 2013 at 11:21 am
Viewing 13 posts - 271 through 283 (of 283 total)