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-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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