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!

Problem on Merge 2 view datasets from Sybase with LIBNAME engine.

Status
Not open for further replies.

6656

Programmer
Nov 5, 2002
104
US
Error message, "Object not found in database. Error Code: -16843057 ct_send(): ", when attempted to join two view datasets from Sybase by using LIBNAME engine.
In SAS TS note, there is a sample for using Proc SQL Pass-through connect with a different alias. How to get workaround with LIBNAME engine and Merge statement? Below is sample code...

Libname dblib sybase server=.........;

Proc sql;
Create view vwdt1 as
Select keys,a,b,c from dblib.sybs1 order by keys;

Create view vwdt2 as
Select keys,x,y,z from dblib.sybs2 order by keys;
Quit;

Data joiondt;
Merge vwdt1 vwdt2;
By keys;
Run;
 
CONNECTION=SHAREDREAD | GLOBALREAD | UNIQUE
indicates whether multiple table opens in a DBMS can use the same connection. Your DBMS might have different arguments for this option; see your DBMS chapter for details.
Default value: SHAREDREAD, unless noted otherwise in your DBMS chapter.

I use Teradata, and I use pass-through SQL most of the time. But I am able to do the following with teradata engine:

data tst;
merge td.tst1(keep = key var11) td.tst2(keep = key var21);
by key;
run;

or:

proc sql;
create view tst1 as
select key, var11
from td.tst1;
create view tst2 as
select key, var21
from td.tst2;
quit;

data tst;
merge tst1 tst2;
by key;
run;

You need to check SAS/Access sybase.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top