With proper flashing, a wood deck will last many years; without it, the deck and the ledger it's attached to will quickly rot. Detailed photos in this article show the difference.
By the DIY experts of The Family Handyman Magazine:June 2000
After you demolish the old deck but before you start work on the new one, you'll need to make sure the wood on and in the house is still in good shape. Water leaking around an old deck ledger can cause significant damage to the house framing. The existing house rim and the lower support walls need to be solid enough to support the multi-ton weight of a deck filled with people. After the old deck is removed, you'll be able to tell if you can still use the house rim. If the wall sheathing behind the rim looks good, you're okay. But if the sheathing is rotten, investigate further by removing the rotted areas, and check the house's rim joist and wall framing to see if they're rotten too. Don't be too eager to rip apart and replace moist or discolored wood; it may still be intact below the surface. Jam a screwdriver into the wood in several places. If the screwdriver penetrates more than 1/4 in. or so, it's replacement time.
Replacing rotted-out rim joists and lower wooden support walls can be a huge job. You may want to have an experienced carpenter on hand to help walk you through that gauntlet. To properly attach a deck ledger, follow these guidelines:
Poor construction details and materials result in a deck that rots quickly and can damage the structure of the house.
Good flashing details and the proper materials insure that a new deck will last for decades.
Have the necessary tools for this DIY project lined up before you start—you’ll save time and frustration.
Avoid last-minute shopping trips by having all your materials ready ahead of time. Here's a list.