-- 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 ...
(SQL Server 2000)<BR><BR>I have a query that basically selects a lot of "complicated" stuff and then dumps it into a #temp table.<BR><BR>I then have a correlated subquery that runs against the temp ...
一部の結果でアクセス不可の可能性があるため、非表示になっています。
アクセス不可の結果を表示する