-- if a user sold less than two items, he/she will have no data from tb1, and thus will be assigned 'no' ...
-- Solution 2 is better in terms of automation. -- You could update the variable to any date you want or GETDATE(), and then same analysis will be done for the new date ...
I'm trying to assign rows in a table to a random variable entirely in Transact SQL (This is MS SQL Server 2000, sp3). I've got it working perfectly except I can't use a variable inside my subquery ...
Some results have been hidden because they may be inaccessible to you
Show inaccessible results