I have a data extension that I need to split into 4 mutually exclusive data extensions. I would like to avoid using the Random data extension feature in Salesforce since I would like to refresh these data extensions before deployment.
I'm fairly new to sql, so I'm hoping there's a simple function for this that I just don't know about. I would like to use one query to assign each row a number 1 through 4. Then I can use subsequent queries to select records where rownumber = 1, rownumber = 2, etc.
I've been googling, and TOP, OFFSET, ROW_NUMBER and PARTITION all sound promising, but I'm not exactly sure how I need to use them to get the results I want. I've also considered looking for row_numbers that are divisible in a specific way, but I'm not sure what the exact formula will be.