This is similar to another recent post. I don't think you can do this with SQL; it's going to take a fair amount of looping to do this so I think you'll need to use a procedural language like PL/SQL.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.