Hello, I am a new member to this forum! Nice to meet you all.

I have just went through set of posts regarding rangejoin, but I could not apply it to my own data project, and all helps would be very grateful!

So, I have two data sets where

use dataSet1

PERMNO FIRSTDATE LASTDATE
25881 19701113 19780630
10015 19830920 19860731
10023 19721214 19730605


and
use dataSet2
PERMNO TargetDate
25881 19701220
10015 19840305
10023 19721216

and on.
so, using dataset 1, I ran the following code
(Both my FirstDate and LastDate are in long format)

rangejoin NamesDate FirstDate LastDate using dataSet2.dta, by (PERMNO)
but I am getting
no observation with valid interval bounds to use as my error message. Would anyone be willing to help me out? Thank you all.