Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SAS Proc SQL UPDATE problem!

Status
Not open for further replies.

bpowell555

Programmer
May 13, 2003
4
GB
I've been struggling with this for a couple of days as a relative SAS developer newbie - this is my first 1000 lines of code ;-)

I can't update more than one table!?! I've tried copied the syntax over from Access and no chance. I've fiddled with everything and can't get it to go.

It won't take a libname in the:

update table1 table2

statement, and if you exclude it - pointing to the work library instead - it doesn't do anything!

How do you use libnames in Proc sql Update and perform a join?
 
I think I know the answer: you can't.

I'll have to try and manipulate a merge or data step update,
cheers,

:-(
 
Check out this thread

thread376-546233 on the same problem.
 
I got that same error message. It appears you can only use UPDATE with one table as it won't take a comma to list a second table and if you list a second table name separated by a space then that will behave as an alias.

Obviously for SQL UPDATE it is sometimes necessary to refer to more than one table as you can with the SELECT statement, but for UPDATE this is not possible with SAS.

Can anyone tell me I'm wrong? I'm now trying to replicate this through UPDATE in the DATA step but its far less intuitive.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top