0

Below table contains company_id, parent company_id, company name three columns is there I want to create one column with hierarchyid datatype of column name as node.

company_id parentcompany_id companyname 826FDFF6-E1FC-44BA-94A1-000ACEAAA8D0 8EDB58B8-7F5C-45D1-A1BF-0004DA969109 BAY 89F2A314-2C1D-44BD-84EF-00120905B95D 671E53DE-EFBC-4D16-993B-A2BB99970A1E Kuehne + Nagel AS, Stvg

  • Please **[edit]** your question (by clicking on the [edit] link below it) and add some [sample data](https://meta.stackexchange.com/questions/81852) and the expected output based on that data. [Formatted text](https://meta.stackoverflow.com/a/251362) please, [no screen shots](http://meta.stackoverflow.com/questions/285551/why-may-i-not-upload-images-of-code-on-so-when-asking-a-question/285557#285557). ([edit] your question - do **not** post code or additional information in comments) –  Jan 06 '20 at 21:23
  • Please clarify what you are looking to achieve as it is not clear from your question. Do you want to generate a CREATE TABLE script for a table that includes a column with hierarchyid or something different? If possible please provide a sample of what you would like. – Martin Cairney Jan 07 '20 at 00:19

0 Answers0