Usage Note 39005: A syntax error occurs when you use the APPEND procedure to append data to an SQL Server table
When you use PROC APPEND to add data to an SQL Server table, you might receive following syntax error:
ERROR: CLI execute error: [SAS/ACCESS to SQL Server][ODBC SQL
Server Driver][SQL Server]Incorrect syntax near the
keyword 'schema'.
This problem occurs when column names in the table contain reserved words and when you use either SAS/ACCESS® Interface to SQL Server or SAS/ACCESS® to ODBC under UNIX.
To solve this problem, add the option QuotedId=yes to the odbc.ini file, as shown in the following example:
[SQLServer2003]
Driver=/SAS/92lib/lib/S0msss22.so
Description=DataDirect 5.2 SQL Server Wire Protocol
Address=sql_server,1433
AnsiNPW=Yes
Database=users
LogonID=
Password=
QuotedId=yes
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to Microsoft SQL Server | 64-bit Enabled AIX | 9.21 | | 9.2 TS2M0 | |
| 64-bit Enabled HP-UX | 9.21 | | 9.2 TS2M0 | |
| 64-bit Enabled Solaris | 9.21 | | 9.2 TS2M0 | |
| HP-UX IPF | 9.21 | | 9.2 TS2M0 | |
| Linux | 9.21 | | 9.2 TS2M0 | |
| Linux for x64 | 9.21 | | 9.2 TS2M0 | |
| Solaris for x64 | 9.21 | | 9.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.
The following error might occur when you use PROC APPEND to add data to an SQL Server table: "ERROR: CLI execute error: [SAS/ACCESS to SQL Server][ODBC SQL Server Driver][SQL Server]Incorrect syntax near the keyword 'schema'. The problem occurs in tables that has a column name with reserved words.
| Type: | Usage Note |
| Priority: | |
| Topic: | Data Management ==> Data Sources ==> External Databases ==> MS SQL Server Data Management ==> Data Sources ==> External Databases ==> ODBC (Open Database Connectivity)
|
| Date Modified: | 2010-11-08 12:51:43 |
| Date Created: | 2010-03-10 17:01:13 |