antiskeptic
Programmer
This may be impossible and I've tried everything I can think of. But does anyone have a clue how I can do this?
I am working with SQL Server 2000 Query Analyzer
The base table was originally a cvs file that I turned into an Access table...that I am now working with in SQL. MAinly because I exhausted all my options in Access, and hoped SQL would have better luck. But I can change that if it would work better another way.
I have a list of Users and thier permissions to thier respective folders. Each user has permission to a "tree" of folders. But all I care about is the top most "root" folder that they have the same permissions for. And what method works for some, does not work for others when I've tried this so far. So I'll give you a couple of examples:
First, the easy one...
In this one, I would only want to see the very top Acct/ folder. Because this user (Admins) has all permissions to the Acct/ folder, that means he has all permissions to everything inside that folder. So I don't need to see any of the other folder paths inside that folder. Do you see what I mean?
I would only need to see this line:
In Crystla I used a Instr(FolderPath,"\") to allow me to find out where the first "\" was and chop off that root folder...but I can't seem to get that same ability in SQL. ??????
But for a little harder one that has me really stumped...this is the lay out:
Okay, for this one he only has a couple "root" folders that he has all permissions for. The paths are very similar in the first two records, for example...but he only has access to those two folders, so I would want to see both.
This is what I would want to see from the above example:
I know this is probably not explained very well, but I really tried ...so please ask any questions to help you help me. I've attempted this in Crystal Reports, and Access. And even thought I had it in Crystal with the help of someone in Crystal Forum (here on Tek-Tips)...but it did not work after all. *pout* So I'm trying here to see if some fresh ideas can put me in the right area to get this working.
Just so you know why this is necessary...Managers are needing to see all thier Users' folders and permissions to establish what groups, have what folders / Who is no longer a valid user / etc. It's a cleanup thing, really. But with all the users and folders involved it would take FOREVER...Unless we ca break it down a bit. Any helpful hints would be SOOOO appreciated.
Thank you,
Antiskeptic
I am working with SQL Server 2000 Query Analyzer
The base table was originally a cvs file that I turned into an Access table...that I am now working with in SQL. MAinly because I exhausted all my options in Access, and hoped SQL would have better luck. But I can change that if it would work better another way.
I have a list of Users and thier permissions to thier respective folders. Each user has permission to a "tree" of folders. But all I care about is the top most "root" folder that they have the same permissions for. And what method works for some, does not work for others when I've tried this so far. So I'll give you a couple of examples:
First, the easy one...
Code:
[b]User Permissions FolderPath[/b]
Admins all Acct\
Admins all Acct\3RD_PRTY\Folder\
Admins all Acct\AR Procedures\
Admins all Acct\AR Procedures\Folder\History
I would only need to see this line:
Code:
[b]User Permissions FolderPath[/b]
Admins all Acct\
But for a little harder one that has me really stumped...this is the lay out:
Code:
[b]User Perms FolderPath[/b]
CPAUL all Accounting\CO01_OP\Operating 2000\
CPAUL all Accounting\CO01_OP\zip files\
CPAUL all Accounting\ESCROW\REPLACE\Chasecrossing\
CPAUL all Accounting\Unclaimed Funds\
CPAUL all Accounting\Unclaimed Funds\6MosOld
CPAUL all Accounting\Ready Refunds\
CPAUL all Home\CPAUL
CPAUL all Home\CPAUL\Favorites
Okay, for this one he only has a couple "root" folders that he has all permissions for. The paths are very similar in the first two records, for example...but he only has access to those two folders, so I would want to see both.
This is what I would want to see from the above example:
Code:
[b]User Perms FolderPath[/b]
CPAUL all Accounting\CO01_OP\Operating 2000\
CPAUL all Accounting\CO01_OP\zip files\
CPAUL all Accounting\ESCROW\REPLACE\Chasecrossing\
CPAUL all Accounting\Unclaimed Funds\
CPAUL all Accounting\Ready Refunds\
CPAUL all Home\CPAUL
I know this is probably not explained very well, but I really tried ...so please ask any questions to help you help me. I've attempted this in Crystal Reports, and Access. And even thought I had it in Crystal with the help of someone in Crystal Forum (here on Tek-Tips)...but it did not work after all. *pout* So I'm trying here to see if some fresh ideas can put me in the right area to get this working.
Just so you know why this is necessary...Managers are needing to see all thier Users' folders and permissions to establish what groups, have what folders / Who is no longer a valid user / etc. It's a cleanup thing, really. But with all the users and folders involved it would take FOREVER...Unless we ca break it down a bit. Any helpful hints would be SOOOO appreciated.
Thank you,
Antiskeptic