- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Requesting your help again.
I am taking a table from sql server to SAS Viya.
In that table there is a variable of length greater than 1024.
I use the following code to copy the table:
DATA survey08; length RESPONSEDIAN_DESC $ 2000; set ANALYTIC.VC_RESPONSEDIAN ; inFORMAT RESPONSEDIAN_DESC $2000. ; FORMAT RESPONSEDIAN_DESC $2000. ; RUN;
Show the following warning;
WARNING: During read: [SAS][ODBC SQL Server Wire Protocol driver]String data, right truncated.
En la tabla resultado me presenta lo siguiente:
I would like to know how to see more characters in this view.
Beforehand thank you very much
Cheers
Jhonar Salina
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Exactly how long is the variable in the external data source?
If it is longer than 2000 then you may have truncated the values by limiting them to 2000 characters with the Length statement.
I am not familiar with the "SQL Server Wire Protocol driver" so do not know if you may also need to make configuration changes to the driver to allow longer values to pass or if it is possible.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I was checking and it brings all the information but it does not show it in the table.
It is displaying 1024 characters max.
Do you know of a way to show more?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Are you saying that the whole value is the SAS dataset, but whatever tool you used to look at the data that led to the photograph you posted has truncated the data?
Did you try looking at it in some other way?
What if you just show some of the values to the log?
For example this will break the first value it finds that is longer than 1000 bytes into chucks of 100 bytes and dump them to the SAS log.
DATA _null_;
length RESPONSEDIAN_DESC $ 2000;
set ANALYTIC.VC_RESPONSEDIAN ;
where length(RESPONSEDIAN_DESC) > 1000;
do i=0 to length(RESPONSEDIAN_DESC) by 100;
string=substrn(RESPONSEDIAN_DESC,i,100) ;
put string $char100.;
end;
stop;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I've already managed to see all the information in the column. I added the option DBMAX_TEXT= at the moment of connecting to SqlServer:
libname analytic sqlsvr dsn="SQL Server Wire Protocol" user="Admin" password="3DAPass" schema=dbo DBMAX_TEXT=12000;
Thank you very much.
Cheers