Help using Base SAS procedures

Proc sql update via odbc

Reply
Frequent Contributor
Posts: 83

Proc sql update via odbc

I am trying to update a table via odbc with a temporary table I created in SAS Enterprise Guide.

So far I have the below code, but it is not working:

libname imcsrs82 odsbc noprompt="Driver={Ingres 9.2}; Server=imcsrs82; Database=imcsdb_dev; Uid=****; Pwd=****";

proc sql;

update imcsrs82.pay_epp_lkup a

set

ytd_earnings = a.ytd_earnings + (select b.qtr_amount from work.QUERY_FOR_IMCS_EPP_QRT B

where a.clock_num=b.clock_num and a.pay_yr = b.pay_year);

run;

I receive the error No cursor name available.  Any help would be appreciated.

Thanks

Attachment
Super User
Posts: 3,252

Re: Proc sql update via odbc

Run your program again with this statement added: options sastrace = ',,,d' SASTRACELOC = SASLOG;

Then post your log which will contain a lot more details of what is happening.

Frequent Contributor
Posts: 83

Re: Proc sql update via odbc

I have attached the log to my previous post.


Super User
Posts: 3,252

Re: Proc sql update via odbc

Perhaps you could try specifying a cursor type like KEYSET_DRIVEN:

http://support.sas.com/documentation/cdl/en/acreldb/65247/HTML/default/viewer.htm#p1pdx0nznnifhhn1rw...

Might also be worth raising a Tech Support track.

Ask a Question
Discussion stats
  • 3 replies
  • 251 views
  • 0 likes
  • 2 in conversation