BookmarkSubscribeRSS Feed
Pandu
Fluorite | Level 6

Hi,

I have a dataset as below:

Pandu_0-1646296328400.png

i want to write a query when calander_week is same and repli_flag 1, 0 then i want to pick Repli_flag 0 values and need to drop repli_flag 1.

 

Thanks in advance

2 REPLIES 2
Kurt_Bremser
Super User

Please post example data in usable form, which means a data step with datalines. Pictures are useless, as we cannot reliably determine data types, lengths, formats and raw values.

On top of that, we would have to type everything in by hand for testing code suggestions; we are not your typists.

ballardw
Super User

@Pandu wrote:

Hi,

I have a dataset as below:

Pandu_0-1646296328400.png

i want to write a query when calander_week is same and repli_flag 1, 0 then i want to pick Repli_flag 0 values and need to drop repli_flag 1.

 

Thanks in advance


When calander_week is same as what? Same as today? Same as the last time I got a haircut? You have to indicate what values are compared.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 2 replies
  • 835 views
  • 0 likes
  • 3 in conversation