i have table of let's say 234,567 records (2 variables) and need to randomly select 5% of each group (only 2 groups,A and B) and assign those selected records a variable new='randomly selected'; I like to keep the selected records within the same dataset as the non selected ones so the resulting dataset should be like : id group new -------------- 100 A randomly selected 101 A 102 B 103 A randomly selected 104 B ...... i know how to do it in two steps but i was wondering if this can be done in one step? Thanks,
... View more