I am assigning new emails to a mailbox database by creating a table to import. I have a script to create a table with 2 columns, one with new emails and one with the name of our mailbox database. Since our last big upload, we have added a second mailbox database. I need to be able to assign the new emails randomly.
Currently I have it set up like this:
SELECT
txtEmailAddress AS Email
'Old Database Name' AS 'Database'
FROM TblUsers
I now need the Database column to be a random mixture of 'New Database 1' and 'New Database 2'. I have looked into using RAND() but it doesnt seem to work as I thought it would.
Any help is greatly appreciated.
Thanks, Rob
Edit for Gordon:
@GordonLinoff Yes, tblUsers contains the users details including their email address. There's about 100 new users and I want to be able to split them 50/50 between the 2 mailboxes. the resulting table should look something like this:
Email | Database
--------------------------------------------------------
abc@email.com | 'New Database 1'
def@email.com | 'New Database 2'
ghi@email.com | 'New Database 1'
jkl@email.com | 'New Database 2'
mno@email.com | 'New Database 1'
etc