Jim and Pam, The Office
Pam and Jim on "The Office." NBC

Office romances may be frowned upon, but statistically speaking, they might actually be a good idea for marriage-minded folks -- at least according to CareerBuilder.com.

In its annual Valentine’s Day survey, the employment website found that three in 10 people who dated a co-worker said their inter-cubicle affair resulted in marriage, a success rate that puts OkCupid to shame.

The survey, which was conducted independently by the research firm Harris Interactive, included 4,000 workers across the country. Of the respondents, 39 percent said they dated a coworker at least once over the course of their career, and 17 percent said they dated a coworker at least twice. Harris conducted the survey in November of last year.

The most common industry to launch coworker romances was the leisure and hospitality industry, followed by information technology, the financial industry and the health care sector. Professional and business services rounded out the top five.

Many employers discourage workplace romances between employees, and some even draw up policies to forbid them. However, the law tends to err on the side of employees’ right live their private lives as they see fit. At the same time, policies prohibiting affairs between supervisors and their subordinates may be valid, as employers have a legal obligation to regulate behavior that could be construed as sexual harassment.

In CareerBuilder’s survey, only 16 percent of respondents admitted to having dated their boss, with the scenario being more common among women than men. However, a full 29 percent said they have dated someone above them in the company hierarchy.

In recent years, workplace romances may have taken a backseat to dating websites, speed dating and “The Bachelor,” but the digital age has also fueled some creative ways to keep them alive. Until this month, the website Bank With Professionals was using LinkedIn’s vast network of interconnected professionals as a way to help like-minded workers find casual hookups. LinkedIn was apparently not too happy about it, however. Last week, the site shut down after reporting that the social network revoked its API, or application programming interface, which is used by the program to talk and share information with other programs.

Workplaces and schools remain the most common places where people report having met their significant other, but dating websites are gaining. A study released last year by the University of Rochester found that 23.2 percent of couples said they’d met online between 2007 and 2009, compared with just 3.8 percent a decade earlier.

In CareerBuilder’s study, respondents cited social settings outside the office as the most common catalyst for a romance with a coworker, so a word to the wise: Go easy on the punch at the next company picnic.

Read the full results of CareerBuilder’s Valentine’s Day survey here.