How To Create A Value Driver Tree

I guess this is your typical newbie mistake on Windows Vista, but even so I had a hard time finding the solution on Google so I thought I’d post about it.

You can set up a value driver tree using a planning function from SEM Business Planning and Simulation (SEM-BPS), dependent on the value driver tree type. Choose Goto ® Planning Environment to switch to the planning environment. For detailed information on configuring the planning objects that you want to connect to. Decision Tree Templates. Decision TreeTree Templates. Decision tree template. Arbol De Decisiones PPT Modelo de Documentos Comerciales Ejemplos. Structuring Value Driver Trees: 1. Creating a Value Driver Tree Use. In a value driver tree, you model the relationships of influence that exist between value drivers (or between the measures taken as the basis). You can model the value driver tree in various ways.

When I was trying to add a key in the Registry Editor, regedit.exe, I got an error message saying “Cannot create value: Error writing to the registry.”
I have never seen this on XP (but then again I don’t edit the registry that often), but since this is Vista with UAC (User Account Control) I thought it might have to do with permissions so I tried to run regedit.exe as Administrator but to no avail.

Finally I figured out that I did not have the right permissions in the registry tree.
The solution is simply to right click on the folder and select Permissions. You may not even have the right to change the permissions, if this is the case then first you have to take ownership – click Advanced and then the Owner tab.

Funny thing about my folder is that the owner was a group called “TrustedInstaller”. After I had taken ownership, I wanted to change it back to the “TrustedInstaller” group but it was nowhere to be found. Apparently you can’t change it back – it is not a group but a service and part of Windows Resource Protection (WRP) as noted by Richard Civil and others in this TechNet post.

Two other useful newbie things I found out – thanks to this post by Tim Sneath of Microsoft – when trying to figure out how to run a regedit.exe as Administrator in Vista was this:

  1. Run from the XP Start menu is now replaced with Start Search bar in Vista. Simply type regedit.exe (or cmd.exe etc.) in the search bar and hit Enter and it will run.
  2. To run an application with Administrator privileges using this method, instead of hitting Enter you hit Ctrl+Shift+Enter.
Active7 years, 11 months ago

I have a SQL table with the following structure.

Column par contains references to id or NULL if no reference, this table is meant to build an hierarchical tree.

Then, given the data:

I want to retrieve a hierarchical tree, up to the last parent, from a given single id.

Example, I want to know the tree from Nicole to the last parent. So the query result will be:

I would normally do this with a SQL query repeating over and over and building the tree server side but I do not want that now.

Is there any way to achieve this with a single SQL query?
I need this for either MySQL or PgSQL.

And I want to know also, if possible, is it also widely supported? In which versions of either MySQL or PgSQL can I expect support?

MarioMario
3,3835 gold badges25 silver badges45 bronze badges

4 Answers

How To Build A Value Driver Tree

It is possible with a single query in Postgres using a recursive common table expression. This is not possible in MySQL as it is one of the few database to not support recursive CTEs.

It would look something like this (not tested)

a_horse_with_no_namea_horse_with_no_name
329k51 gold badges514 silver badges607 bronze badges

For Postgres, see http://www.postgresql.org/docs/8.4/static/queries-with.html

MySQL doesn't support this syntax (unless it's in a beta/development tree somewhere). Oracle has something similar using connect by prior.

a_horse_with_no_name
329k51 gold badges514 silver badges607 bronze badges
Marc BMarc B
320k31 gold badges337 silver badges437 bronze badges

This article is probably what you need to look at:

JonHow to create value statementJon
1,8422 gold badges19 silver badges27 bronze badges

In Oracle, this is done via:

(my [[…]] syntax denotes optional query bits.

MySQL is planning to integrate such a feature. For PostgreSQL there is another answer helping you.

BenoitBenoit
61.6k17 gold badges173 silver badges214 bronze badges

Not the answer you're looking for? Browse other questions tagged sqldatabasehierarchical-data or ask your own question.

Posted :