Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: merge/joinby with if condition

From   Taavi Lai <>
Subject   st: merge/joinby with if condition
Date   Sat, 13 Aug 2005 01:41:17 +0300

Dear statalist,

I have two datasets that I have to join using time condition. I was thinking of -joinby- but it doesn't seem to have an -if- option (?). I've looked into Stata manual and list archive but even if the answer is there I don't recognise it.

Dataset 1 has variables:
id start_date1 end_date1 sum1

Dataset 2 has variables:
id start_date2 end_date2 sum2

I need to join/merge these files by variable id and a condition:
start_date1<=start_date2 & end_date1>=end_date2

Any suggestions?

PS. using Stata 8.2
* For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index