BookmarkSubscribeRSS Feed
BETO
Fluorite | Level 6

hi I have 3 tables

1st table shows if service was missed  data is pulling for the pervious month .it looks like this

ID.   date.        Complinace

a1.    07/01/15.       No

a2.       07/05/15.       No

a2.       07/09/15.       No

a3.        07/10/15.      No

2nd table shows if there was a ticket open

ID.         Date.            Tick

a1.        07/05/15.        123

a2.        07/8/15.            124

a3.          07/14/15.           126

the 3rd table would show all the services process in a month...what happens if  service is missed vendor needs to go back. To service  Machine ...but if they don't than there is a ticket that is open base on table 2

id.       Date.      Type

a1.      07/03/15.    service

a2.       07/07/15.    Service

THe output. That I'm looking for is

only when there is match between table 1 and table 2 and doesn't exist on table 3 ... I hope it make sense thanks for assistance

5 REPLIES 5
ballardw
Super User

Have you attempted to combine the first two datasets yet?

BETO
Fluorite | Level 6

hi thanks for  responding  I thought of that but there could be more one occurances of ID an differ date...

the 2d table would id but the date will not be like for like...

BETO
Fluorite | Level 6

sorry  screen froze the 3rd table will show if vendor went back after the miss service date to determine if machine was service if I was then it's good it's when it wasn't an it generates a tick is what I need to output....tthe issue is how to connect tables when id is same but date is differ within a 7 day window thanks for help

Ksharp
Super User

You don't post the output you want yet ?

proc sql;

select id,date from table1

intersect

select id,date from table2

except

select id,date from table3

;

quit;

BETO
Fluorite | Level 6

Xia,

Sorry  the output that I'm looking for is table 1 and table 2  table 3 is my filter 

output

       from 1st table.       From 2nd table        From 3rd table

id. Date  compliance       Tick                           Blank.                  I would report on that

id date.   Compliance.      Tick.                        Service.             I would not report on that.....

here is what I want to do if a machine was not service let say on 8/01/15.  An on 8/4/15 it generates a ticket  than I would report  it

different secnario

machine is is not service on 08/1/15.   And on 08/3/15  it gets service   ThAt gets excluded....

THanks for help

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 5 replies
  • 1145 views
  • 0 likes
  • 3 in conversation