Find Jobs
Hire Freelancers

567675 SQL Code

N/A

Completed
Posted almost 12 years ago

N/A

Paid on delivery
OK, I have a table called permissions in SQL, and I want someone to write me some code to help me retrieve data from it. Structure is as follows: Columns (all INTEGER unless otherwise specified) FROM_A FROM_B FROM_C FROM_D TO_A TO_B TO_C TO_D propogate_permission (BIT) Permissions are granted FROM_X to TO_X by having the same number in both columns so permission granted for 66 would be FROM_A = 66 and in the same row TO_B = 66 I want to be able to retrieve all TO_X results but, and this is the bit that is particularly tricky. TO_A may have been granted through a more complicated relationship for example Permission is given FROM_B to TO_C. Then FROM_C = TO_D and then TO_D = TO_A. I suspect there are an infinite number of permutations for this but we need to be able to collect all of the TO_X results. We want 4 queries in total, one for all of the TO_A results, then all of TO_B, all of TO_C and finally TO_D Propogate field if checks means the relationship propogates through, but if the propogate field is not checked then we need to record this lack of propogation in the result. If necessary, the code can be written in VB.NET so you can store an array of the results and then use the array to re-query the SQL. Hopfully the complexity of the problem is clear from above Results should be DISTINCT, sorry, forgot to mention that. Also, to prove you have read the specification please include the word COBRA in your response
Project ID: 2313639

About the project

1 proposal
Remote project
Active 12 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
$200 USD in 5 days
4.6 (128 reviews)
7.4
7.4

About the client

Flag of UNITED KINGDOM
Stalybridge, United Kingdom
4.9
12
Payment method verified
Member since Feb 25, 2008

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.