Hi All,
I have created a Prompt to select a date range and assigned it to a program. I am now having trouble assigning the date prompts to the data Step.
This is my data step
Data Work.CLK_Farmers_Assistance_Hotline;
Set CARTEL.Preagent_Telephony;
Keep Event_DT QUEUE_CD QUEUE Calls_entered_cnt calls_ANswered_CNT calls_abandoned_cnt Total_answer_tm;
Where QUEUE_CD in ('NAT_DRA' 'CLK_RUDA_DROUGHTASSIST')
and EVENT_DT = '&Date_Range_Min' and EVENT_DT <='&Date_Range_Max';
Run;
I need to assign the date prompts to EVENT_DT.
I select dates from the prompt and when the rest of the code runs I get the following error.
37 and EVENT_DT = '&Date_Range_Min' and EVENT_DT <='&Date_Range_Max';
ERROR: WHERE clause operator requires compatible variables.
Have I used the correct code to use the selected dates form the prompt? What do i need to change it to if I haven't?
Thanks in advance
Fixed
Didn't realise I had left off the & in the code:
and EVENT_DT bewteen "&Date_Prompt_Min."d and "&Date_Prompt_Max."d;
works now
Fixed
Didn't realise I had left off the & in the code:
and EVENT_DT bewteen "&Date_Prompt_Min."d and "&Date_Prompt_Max."d;
works now
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.