mirror of
https://github.com/sasjs/core.git
synced 2025-12-10 22:14:35 +00:00
fix: refactored mp_getconstraints due to apparent bug in dictionary.table_constraints. Added test. Closes #83
This commit is contained in:
@@ -49,8 +49,11 @@ create table &outds as
|
||||
on upcase(a.TABLE_CATALOG)=upcase(b.TABLE_CATALOG)
|
||||
and upcase(a.TABLE_NAME)=upcase(b.TABLE_NAME)
|
||||
and a.constraint_name=b.constraint_name
|
||||
where upcase(a.TABLE_CATALOG)="&lib"
|
||||
and upcase(b.TABLE_CATALOG)="&lib"
|
||||
/**
|
||||
* We cannot apply this clause to the underlying dictionary table. See:
|
||||
* https://communities.sas.com/t5/SAS-Programming/Unexpected-Where-Clause-behaviour-in-dictionary-TABLE/m-p/771554#M244867
|
||||
*/
|
||||
where calculated libref="&lib"
|
||||
%if "&ds" ne "" %then %do;
|
||||
and upcase(a.TABLE_NAME)="&ds"
|
||||
and upcase(b.TABLE_NAME)="&ds"
|
||||
|
||||
Reference in New Issue
Block a user