Hi,
I'm not sure if I understand correctly the meaning of your question but I'll try to answer it.
Maybe could you combine your Proc SQL with the macro facility ?
That way you are able to conditionally add variables to a table:
Proc sql;
Create Table MyNewTable as
select a.FirstVariable
%IF (First condition) %THEN %DO;
, 'ConditionIsTrue' as SecondVariable
%END; %ELSE %DO;
, 'ConditionIsFalse' as ThirdVariable
%END;
, 'DummyValue' as LastVariable
from MyOldTable a;
Quit;
The problem is that this solution is not directly based on the value of other variables of your base table (excepted if you retrieve those values in previous steps by the mean of macro variable i.e...).
I hope it helps.
Regards,
Florent
... View more