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.
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.