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.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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
  • 521 views
  • 0 likes
  • 3 in conversation