What are the challenges you face when working across database platforms? Take the survey

SQL Data Generator, Datatype: hierarchyid

We are testing SQL Data Generator. 

we have a table with a hierarchy ID column:
/ 1/1 /
/ 1/1/1 /
/ 1/1/2 /
/ 2 /
/ 2/1 /

With the data generator we can generate hierarchyid data without problems:

/ 1002/16262/19222/14780 /
/ 10021/14301/8796/8797 /
/ 10036/18117/24409/28027 /

But the generated values do not represent a hierarchy, the higher-level IDs are missing.

We would expect such values, e.g.
/ 1002 /
/ 1002/16262 /
/ 1002/16262/19222 /
/ 1002/16262/19222/14780 /

Is there a way to create such hierarchical IDs so that the hierarchy is complete.



  • Options

    Thanks for reaching out to us regarding this.

    Just to let you know that I am looking at this for you now and will provide a proper update for you shortly.

    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
  • Options
    Dan_JDan_J Posts: 454 Silver 2

    My sincerest apology for the delay in responding to you regarding this! I am keen to establish if it is possible to achieve the hierarchical ID data you have described and would greatly appreciate it if you can confirm the following:

    - What version of SQL Data Generator you are using?

    - Would it be possible to get a copy of the expression code being used within SQL Data Generator for your hierarchy ID column? This will aid me in first reproducing the values that do not represent a hierarchy so that I can then amend that expression in an attempt to achieve the correct hierarchical IDs.

    Again, I do apologize for the delay in reaching to you regarding this!

    Kind regards

    Dan Jary | Redgate Software
    Have you visited our Help Center?
Sign In or Register to comment.