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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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
  • 1029 views
  • 0 likes
  • 1 in conversation