Guest User

Untitled

a guest
Jan 18th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. with
  2. locations as (select distinct LocId from T)
  3. items as (select distinct ItemId from T)
  4. select l.LocId, i.ItemId, t.SomeData
  5. from
  6. locations as l cross join items as i
  7. left outer join T as t
  8. on t.LocId = l.LocId and t.ItemId = i.ItemId;
Add Comment
Please, Sign In to add comment