- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
proc sql;
connect to sqlsvr(dsn=xxx user=yyy pwd='zzz');
execute (truncate table base.monthlydata) by sqlsvr;
disconnect from sqlsvr;
quit;
error in log
ERROR: CLI execute error: [DataDirect][ODBC SQL Server Driver][SQL Server]Cannot find the object "monthlydata" because it does not
exist or you do not have permissions.
when I check the sqlsvr side the monthlydata table exists.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you check if you have the permissions to truncate the table and have you checked if you can query on that table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I checked the table is there. I queried the table also Hima.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
sassharp wrote:
I checked the table is there. I queried the table also Hima.
And you have the required permissions to perform a truncate on the table?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This is the problem with permission . I beleive this user in coonection does not have that permission for DDL. (truncate).
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I can delete table, drop table from SAS side. Why not truncate?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
yeah..u will be having access to delete or drop a table from SAS side, but when u r trying to connect to external data base (sqlserver). you might not be having access to truncate a table or delete a table. only DBA's or database developers will be having access to truncate or delete the table.
Regards,
vishnu