Search notes:

SAS: proc sql - feedback

The feedback option writes into the SAS log, what an SQL statement is transformed to.
data dat;
  id  =  42;
  val = 'Hello world';
  output;
run;

%macro tq84_gt_twenty_four(x);
  &x gt 42
%mend  tq84_gt_twenty_four;

%let tq84_val=xyz;

proc sql feedback;
  select
    *
  from
    dat
  where
    %tq84_gt_twenty_four(id)
    &
    val <> "&tq84_val"
  ;
/*
    The feedback options writes into the log file
    what the sql statement is actually turned into:

         select DAT.id, DAT.val
                from WORK.DAT
               where (DAT.id > 42) and (DAT.val not = 'xyz');

*/
quit;
Github repository about-SAS, path: /programming/proc/sql/feedback/basic.sas

See also

Option sastrace=',,,d'
proc sql

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/Companie...', 1759415441, '216.73.216.42', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/Companies-Products/SAS/programming/proc/sql/feedback/index(75): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78