1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-03 23:50:06 +00:00

fix: conditional logic for mp_getconstraints, test also updated. Closes #235

This commit is contained in:
Allan Bowe
2022-05-10 14:59:31 +00:00
parent fe94d3781a
commit cb4ea71e81
4 changed files with 79 additions and 19 deletions

View File

@@ -40,6 +40,22 @@
%let lib=%upcase(&lib);
%let ds=%upcase(&ds);
/**
* Cater for environments where sashelp.vcncolu is not available
*/
%if %sysfunc(exist(sashelp.vcncolu,view))=0 %then %do;
proc sql;
create table &outds(
libref char(8)
,TABLE_NAME char(32)
,constraint_type char(8) label='Constraint Type'
,constraint_name char(32) label='Constraint Name'
,column_name char(32) label='Column'
,constraint_order num
);
%return;
%end;
/**
* Neither dictionary tables nor sashelp provides a constraint order column,
* however they DO arrive in the correct order. So, create the col.