BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hello All

I am trying to extract the following fields. The issue is with the variable period_end_date which has a DATE9. format. I am getting the error shown below and not able to compute why I am getting the error? I even tried enclosing the date in single quotes but that is not helping too.

Code
data novantas.tempHH (keep =
hshld_idfr
asgnd_branch_idfr
hd_hshld_cmptd_age
income_rng_type
dpst_acct_cnt
dpst_acct_amt
macro_seg_code
micro_seg_code
period_end_date
);
set whs00.hshld_mnth;
where period_end_date = 29FEB2008;
run;

Error

53 data novantas.tempHH (keep =
54 hshld_idfr
55 asgnd_branch_idfr
56 hd_hshld_cmptd_age
57 income_rng_type
58 dpst_acct_cnt
59 dpst_acct_amt
60 macro_seg_code
61 micro_seg_code
62 period_end_date
63 );
64 set whs00.hshld_mnth;
65 where period_end_date = 29FEB2008;
-------
22
76
ERROR: Syntax error while parsing WHERE clause.
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>,
=, >, >=, AND, EQ, GE, GT, LE, LT, NE, OR, ^=, |, ||, ~=.

ERROR 76-322: Syntax error, statement will be ignored.

Thanks for your help.
Pappu.
1 REPLY 1
deleted_user
Not applicable
Never Mind - I figured it out!!!!!

Pappu.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 791 views
  • 0 likes
  • 1 in conversation