Understandable request. I thought you didnt need to download the file to view it but it would mae sense to have some data to play with.
Here are the datasets. Please ignore the differnet date syntax. My goal is to use Date1 and Date2 from the first dataset and calculate NewColum found in the thrir dataset by using the values in column2 of the second dataset. Sounds more confusing than it is I think.
data Qry_Btbl;
infile datalines dsd truncover;
input
Field1:$3.
Field2:3.
Date1:mmddyy6.
Date2:mmddyy6.
;
datalines;
rhw, 553, 10/3/2016, 10/11/2016
ghj, 251, 10/3/2016, 10/11/2016
rwr, 115, 10/3/2016, 10/12/2016
zsf, 555, 10/3/2016, 10/13/2016
nbf, 513, 10/6/2016, 10/14/2016
nws, 844, 10/6/2016, 10/18/2016
cxm, 350, 10/6/2016, 10/19/2016
olp, 422, 10/6/2016, 10/17/2016
;;;;
data Btbl_Dates;
infile datalines dsd truncover;
input
Column1:mmddyy6.
Column2:1.
;
datalines;
01Oct2016, 0
02Oct2016, 0
03Oct2016, 1
04Oct2016, 1
05Oct2016, 1
06Oct2016, 1
07Oct2016, 1
08Oct2016, 0
09Oct2016, 0
10Oct2016, 0
11Oct2016, 1
12Oct2016, 1
13Oct2016, 1
14Oct2016, 1
15Oct2016, 0
16Oct2016, 0
17Oct2016, 1
18Oct2016, 1
19Oct2016, 1
20Oct2016, 1
21Oct2016, 1
22Oct2016, 0
23Oct2016, 0
24Oct2016, 1
25Oct2016, 1
26Oct2016, 1
27Oct2016, 1
28Oct2016, 1
29Oct2016, 0
30Oct2016, 0
31Oct2016, 1
;;;;
data updated_Qry_Btbl;
infile datalines dsd truncover;
input
Field1:$3.
Field2:3.
Date1:mmddyy6.
Date2:mmddyy6.
NewColumn:2.
;
datalines;
rhw, 553, 10/3/2016, 10/11/2016, 6
ghj, 251, 10/3/2016, 10/11/2016, 6
rwr, 115, 10/3/2016, 10/12/2016, 7
zsf, 555, 10/3/2016, 10/13/2016, 8
nbf, 513, 10/6/2016, 10/14/2016, 6
nws, 844, 10/6/2016, 10/18/2016, 8
cxm, 350, 10/6/2016, 10/19/2016, 9
olp, 422, 10/6/2016, 10/17/2016, 7
;;;;
... View more