Skip to main content

All Questions

Filter by
Sorted by
Tagged with
3 votes
2 answers
323 views

Return batches of rows based on one row

Say I have a table like this in SQL Server 2008: id | name | qty ------------------- 1 | john | 1 2 | bill | 3 3 | mary | 2 4 | jill | 5 I would like to query this ...
pvdjay's user avatar
  • 33
3 votes
1 answer
1k views

Cross Apply without a function

I would like to run a query very similar to this on one of my production databases: -- Setup the table (Already there in my real scenario) create table dbo.MyTable(MyValue int, MyGroup varchar(5)) ...
Vaccano's user avatar
  • 2,540