Hi.
According to me dash doesn't affect your ranking but it use for separating two words ya category for example www.domain.com/seo-affiliate.php. Over here dash is used for saperating this two words. Search engine algorithms are advanced enough to identify two separate words without a space so no need to put dash. If your domain name is too long then you can use dash because, i thought domain names with dashes were less memorable than domain names without. If you decide to use a hyphenated domain, use the hyphens to separate your keywords where needed. By using dash in your domain names you are able to retain your original choice and also keep the keyword in its exact order but people sometimes forgot to type dash when there are looking for particular website so there is chance to losing visitors. So don't use dash in your domain is batter for ranking and traffic purpose.