Skip to content

Instantly share code, notes, and snippets.

@jeremyforan
Created January 3, 2023 21:39
Show Gist options
  • Save jeremyforan/4f836bcae9b8d59593d401657ec45f02 to your computer and use it in GitHub Desktop.
Save jeremyforan/4f836bcae9b8d59593d401657ec45f02 to your computer and use it in GitHub Desktop.
update dbo.earth set node =
case
when node = '\' then '0'
else '0' || replace(left(node, length(node) - 1 ),'\', '.')
end;
alter table dbo.earth
alter column node type ltree using node::ltree;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment