BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
DME790
Pyrite | Level 9

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.

 

Prompt.PNG

 

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

 

 

 

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
DME790
Pyrite | Level 9

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

View solution in original post

1 REPLY 1
DME790
Pyrite | Level 9

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

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

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
  • 2861 views
  • 2 likes
  • 1 in conversation