Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

create a hierarchial table structure

Posted on 2014-09-23
2
Medium Priority
?
131 Views
Last Modified: 2014-09-24
I have a simple account table.  How do you create a hierarchial table structure for accounts that just goes 1 level deep?

So, you can have a parent account and then child accounts underneath the parent.

Thanks for any help.
Regards.
0
Comment
Question by:-Dman100-
2 Comments
 
LVL 6

Accepted Solution

by:
ianmills2002 earned 2000 total points
ID: 40340770
Two options.

1. A 2nd Parent account table and all the accounts in the account table have a foreign key to link to the parent.

2. Keep them all in the same table and add a Parent Account column. When NULL, the account record is a parent, when NOT NULL, the account has a parent account.
0
 

Author Closing Comment

by:-Dman100-
ID: 40341663
Thank you!
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Ready to get certified? Check out some courses that help you prepare for third-party exams.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

876 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question