BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
PravinMishra
Quartz | Level 8

Hi,

I have two SAS table  one and two.both the table having some same column and some different col.I need to append the data and create a single dataset. on top of that I need to create view on the combine table.

I am using below code but not able to do it.

data join / view=one.join_vw;

set one two;

run;

its throwing an error

ERROR: The requested type of view (Input or Output) cannot be determined.

let me know anyone have any solution for this.

further I need to access the view for different process. can I would be able to access the view as it is created on two different table.

Thanks;

1 ACCEPTED SOLUTION

Accepted Solutions
PravinMishra
Quartz | Level 8

I have used below code and it's working fine.

data join_one/view=join_one;

set oil.oil;

run;

data join_two/view=join_two;

set ocb.ocb;

run;

data out.join_vw/ view=out.join_vw;

set join_one join_two;

run;

data join_out;

set out.join_vw;

run;

View solution in original post

2 REPLIES 2
Haikuo
Onyx | Level 15

I think you syntax is a bit off,  you can only have ONE name for ONE view, here you are offering two: 'join' and 'one.join_vw'. Try to make them the same:

data one.join_vw / view=one.join_vw;

set one two;

run;

Good luck,

Haikuo

BTW, just to be clear, SAS View is a piece of SAS code, so it doesn't care how many tables involved, when you used it, it also doesn't care if it is sourced from multiple tables.

PravinMishra
Quartz | Level 8

I have used below code and it's working fine.

data join_one/view=join_one;

set oil.oil;

run;

data join_two/view=join_two;

set ocb.ocb;

run;

data out.join_vw/ view=out.join_vw;

set join_one join_two;

run;

data join_out;

set out.join_vw;

run;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 2655 views
  • 3 likes
  • 2 in conversation