The first block of code is working with Length= statements, but the second block is failing an Oracle Prepare Error. Any suggestions? 1506 proc sql;
1507 create table QueryData as
1508 ( select DISTINCT %str(%')&analysis_desc.%str(%') as RULE_NM length = 1200,
1509 b.actual_dlvry_date as AD_DT,
1510 b.imb_code length = 100,
1511 &rule_order as RULE_ORDER,
1512 b.spm_calc_batch_date
1513 from iv_ora.bi_spm_piece_recon a, bids_ora.bi_spm_piece_recon b
1514 where a.spm_calc_batch_date = b.spm_calc_batch_date
1515 and a.imb_code = b.imb_code
1516 and &rule
1517 );
1518 quit; 1550 proc sql;
1551 connect to oracle as db
1551! (user=&orauser password=&orapass path="ivasprd");
1552 create table QueryData as
1553 select * from connection to db
1554 ( select 'PIECES MISSING IN IV' as RULE_NM length = 1200,
1555 actual_dlvry_date as AD_DT,
1556 imb_code length = 100,
1557 999.1 as RULE_ORDER,
1558 spm_calc_batch_date
1559 from ivprl.bi_spm_piece_bids_recon
1560 where imb_code||trunc(spm_calc_batch_date) not in(select imb_code||trunc(spm_calc_batch_date) from
1560! ivprl.bi_spm_piece_iv_recon)
1561 );
ERROR: ORACLE prepare error: ORA-00923: FROM keyword not found where expected. SQL statement: select 'PIECES MISSING IN IV' as
RULE_NM length = 1200, actual_dlvry_date as AD_DT, imb_code length = 100, 999.1 as RULE_ORDER, spm_calc_batch_date from
ivprl.bi_spm_piece_bids_recon where imb_code||trunc(spm_calc_batch_date) not in(select
imb_code||trunc(spm_calc_batch_date) from ivprl.bi_spm_piece_iv_recon).
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
1562 disconnect from db;
NOTE: Statement not executed due to NOEXEC option.
1563 quit;
NOTE: The SAS System stopped processing this step because of errors.
... View more