Tehe
Good Luck Pharoah - U gotta a long way 2 go
Maybe heres a pointer
Understand Normalization
Learning 2 make joins will make more sense.
ie. How many rights do you want users to have (pun here)
Is it a 1 to Many ?
Sounds 2 me like U may need 2 add some Id's to these Rows
User_id
Dept_id
etc
Probably splitting em out into instancing tables -
the rights (we won't talk about right outer joins) one at least -
Quote:
Here's Some Skeleton Code to get you started
CREATE TABLE tblUser (UserId int,FirstName VarChar(50),LastName VarChar(50))
CREATE TABLE tblRights (RightsId Smallint,RightsDesc VarChar(50))
CREATE TABLE tblDept (DeptId SmallInt,DeptDesc VarChar(50))
CREATE TABLE tblUserRights (UserId SmallInt,RightsId SmallInt)
INSERT INTO tblUser (UserId,FirstName,LastName) VALUES (1,'Fred','FlintStone')
INSERT INTO tblRights (RightsId,RightsDesc) VALUES (1,'BossMan')
INSERT INTO tblUserRights (UserId,RightsId) VALUES (1,1)
SELECT tblUser.UserId,tblRights.RightsDesc
FROM tblUser,tblRights,tblUserRights
WHERE
tblUser.UserId = tblUserRights.UserId
AND
tblUserRights.RightsId = tblRights.RightsId
|
then DeNormalize it back to the begining - lol
Once you got yer Data - pop it out using EM wizard / DTS or if U feeling adventurous with TSQL.
Hope I Helped n Did'nt scare U off
GW