When I run this statement I receive
data test; set sashelp.vcolumn ;
run;
ERROR: Incorrect length in SAS Metadata Repository for column SCHEV_ETHNICITY_DESC.
ERROR: SQL View SASHELP.VCOLUMN could not be processed.
I recently updated some tables.
How do I pinpoint what is causing this error?
Is there a way to identify which table is out of sync? I updated the metadata for a full library to resolve the error.
data test
set sashelp.vcolumn;
if memname ne 'SCHEV_ETHNICITY_DESC';
run;
If that gets rid of the problem, then go to folder location:
Local -> Libraries -> SASHELP -> Vcolumn ->
rc, 'Explore' -> look at length column to get the idea about correct length values -> Set filter memname = 'SCHEV_ETHNICITY_DESC', keep memname and length
that will show the incorrect length value
data sashelp.vcolumn;
where memname = 'SCHEV_ETHNICITY_DESC';
lengh = correct-value;
run;
It looks like you register your SAS tables in SAS metadata. What this means is, every time you change the attributes of your SAS tables, you need to update those tables in SAS metadata so the column definitions remain the same.
Is there a way to identify which table is out of sync? I updated the metadata for a full library to resolve the error.
Yes, @pink_poodle's VCOLUMN example code will also identify the table.
Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.