Problem Note 4011: SYBASE INTO syntax to create a table using the PROC SQL EXECUTE
statement not supported in SAS/ACCESS Interface to Sybase
Beginning in Version 8.1 TS1M0 and beyond of the SAS/ACCESS Interface
to Sybase, the Sybase INTO syntax to create a temporary or permanent
table with the SQL Passthrough EXECUTE statement will generate the
error message:
ERROR: The EXECUTE Statement cannot process SQL SELECT queries.
This same code ran successfully in previous releases of the interface.
An example of a query that will fail is:
execute(select * into sybase_tab from oldtab) by sybase;
Some possible workarounds are:
1) To create a stored procedure to create the table in Sybase. This
stored procedure can be used in the PROC SQL Passthrough to create
the table. For example, in ISQL you will create the stored
procedure:
create procedure tab_create
as
select * into sybase_table from oldtab
go
In SAS, you will use the PROC SQL EXECUTE statement to create the
table:
proc sql;
connect to sybase(user=username password=sybpass);
execute (exec tab_create) by sybase;
quit;
2) Use the SYBASE CREATE TABLE statement to create the table.
proc sql;
connect to sybase(user=username password=sybpass);
execute (create table sybase_table
(column1 int,
column2 varchar(20),
column3 varchar(12))) by sybase;
execute(insert sybase_table
select * from oldtab) by sybase;
3) Use the PROC SQL Passthrough SELECT statement. You will receive
the error message with this method but the table will be created.
The error message is: ERROR: Error in result set.
proc sql;
connect to sybase(user=username password=sybpass);
reset noprint;
select * from connection to sybase
(select * into sybase_table from oldtab);
The problem will be corrected in Version 8.2 TS 2M0.
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | SAS/ACCESS Interface to Sybase | Solaris | 8 TS M1 | 8.2 TS2M0 |
| ABI+ for Intel Architecture | 8 TS M1 | 8.2 TS2M0 |
| 64-bit Enabled Solaris | 8 TS M1 | 8.2 TS2M0 |
| 64-bit Enabled AIX | 8 TS M1 | 8.2 TS2M0 |
| 64-bit Enabled HP-UX | 8 TS M1 | 8.2 TS2M0 |
| HP-UX | 8 TS M1 | 8.2 TS2M0 |
| Tru64 UNIX | 8 TS M1 | 8.2 TS2M0 |
| AIX | 8 TS M1 | 8.2 TS2M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
| Type: | Problem Note |
| Priority: | high |
| Topic: | Data Management ==> Data Sources ==> External Databases ==> Sybase SAS Reference ==> LIBNAME Engines
|
| Date Modified: | 2001-02-13 10:26:01 |
| Date Created: | 2000-12-21 11:01:05 |