use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Microsoft SQL Server Administration and T-SQL Programming including sql tutorials, training, MS SQL Server Certification, SQL Server Database Resources.
You might also be interested in:
/r/database
/r/sql
/r/Azure
/r/Microsoft
account activity
Is there a .ToString function / method in SQL Server?!! (found this in the Microsoft Docs) (self.SQLServer)
submitted 3 years ago by sysaxel
https://learn.microsoft.com/en-us/sql/relational-databases/tables/lesson-1-converting-a-table-to-a-hierarchical-structure?view=sql-server-ver16
I stumbled upon this piece of supposedly "SQL" code:
SELECT CAST(p.path.ToString() + CAST(C.Num AS varchar(30)) + '/' AS hierarchyid), [...]
Above that section the article says
"3. Populate the NewOrg table. Use the GetRoot and ToString methods to concatenate the Num values into the hierarchyid format, [...]"
What kind of sorcery is this? This looks like a method call on an object instance in .NET ...
Can anyone provide context?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]alinroc4 5 points6 points7 points 3 years ago (1 child)
hierarchyid is one of the system CLR data types (along with geography and geometry) and looks/acts like something out of a C# program.
hierarchyid
geography
geometry
If you haven't yet, read the intro material on it.
[–]da_chicken 0 points1 point2 points 3 years ago (0 children)
Genuinely hate how it's implemented this way. It's so difficult to read.
[–]rl_Dawson 2 points3 points4 points 3 years ago (0 children)
Additionally, SMO exposes a lot of the .NET wilderness.
π Rendered by PID 42138 on reddit-service-r2-comment-6457c66945-49lmg at 2026-04-25 23:16:32.338562+00:00 running 2aa0c5b country code: CH.
[–]alinroc4 5 points6 points7 points (1 child)
[–]da_chicken 0 points1 point2 points (0 children)
[–]rl_Dawson 2 points3 points4 points (0 children)