Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +-------+--------+---------------+
- | label | Name | Budget |
- +-------+--------+---------------+
- | 1 | ABC | Allocated |
- | 1 | DEF | NotAllocated |
- | 0 | XYZ | Allocated |
- | 0 | LMN | Allocated |
- | 1 | QRS | NotAllocated |
- | | | |
- +-------+--------+---------------+
- SELECT TOP 1600 *
- FROM myTable
- ORDER BY label ASC
- UNION ALL
- SELECT TOP 1546 *
- FROM myTable
- ORDER BY label DESC
Add Comment
Please, Sign In to add comment