Click here to Skip to main content
16,005,037 members
Home / Discussions / Database
   

Database

 
GeneralRe: Excel -> tSQL Pin
Arjan Einbu28-Jun-04 11:06
Arjan Einbu28-Jun-04 11:06 
GeneralRe: Excel -> tSQL Pin
partt29-Jun-04 5:53
partt29-Jun-04 5:53 
GeneralCopy data b/w tables Pin
Imtiaz Murtaza27-Jun-04 20:51
Imtiaz Murtaza27-Jun-04 20:51 
GeneralRe: Copy data b/w tables Pin
Steven Campbell28-Jun-04 3:12
Steven Campbell28-Jun-04 3:12 
GeneralAnother Oracle question Pin
pankajdaga27-Jun-04 7:22
pankajdaga27-Jun-04 7:22 
Generalweird Oracle problem Pin
pankajdaga27-Jun-04 1:57
pankajdaga27-Jun-04 1:57 
GeneralRe: weird Oracle problem Pin
ThomasH119-Jul-04 12:27
ThomasH119-Jul-04 12:27 
GeneralHelp with SQL query Pin
brdavid26-Jun-04 9:52
brdavid26-Jun-04 9:52 
I think I'm either getting over my head, have complicated the issue beyond the scope of SQL, or maybe I have some gaps of knowledge missing for SQL queries. Irregardless, I will try to present the idea, my attempted SQL query, and the issue.

I have 7 tables I want to join (seriously).
  1. Table 1: ERAS - EraCode, Description
  2. Table 2: AGES - EraCode, AgeCode, Description
  3. Table 3: GROUPS - GroupCode, Description
  4. Table 4: CATEGORIES - GroupCode, CategoryCode, Description
  5. Table 5: SKILLS - GroupCode, CategoryCode, SkillCode, Description
  6. Table 6: SUBSKILLS - GroupCode, CategoryCode, SkillCode, SubSkillCode, Description
  7. Table 7: SKILLSINAGES - EraCode, AgeCode, GroupCode, CategoryCode, SkillCode, SubSkillCode

Assume these table have a one to many relationship on the fields that are common.

I created a successful query in Access that manages to get Table 3, 4, 5, and 6 together
<br />
SELECT s.Synopsis, ss.Synopsis, ss.Class, ss.Progression, s.Class, s.Progression, c.Progression, c.GroupCode, c.CategoryCode, s.SkillCode, ss.SubSkillCode, cg.Description, c.Description, s.Description, ss.Description, ss.Table FROM ((CATEGORYGROUPS AS cg LEFT JOIN CATEGORY AS c ON cg.GroupCode = c.GroupCode) LEFT JOIN SKILLS AS s ON (c.CategoryCode = s.CategoryCode) AND (c.GroupCode = s.GroupCode)) LEFT JOIN SUBSKILLS AS ss ON (s.GroupCode = ss.GroupCode) AND (s.CategoryCode = ss.CategoryCode) AND (s.SkillCode = ss.SkillCode) ORDER BY cg.GroupCode, c.CategoryCode, s.SkillCode, ss.SubSkillCode;";<br />


But now I need to add in more restrictions which include Table 1 and 2, therefore I created table 7 as the "relational table" if that is the correct term but I am having difficulty in applying it to my previous query. I though I could do this

<br />
SELECT s.Synopsis, ss.Synopsis, ss.Class, ss.Progression, s.Class, s.Progression, c.Progression, c.GroupCode, c.CategoryCode, s.SkillCode, ss.SubSkillCode, cg.Description, c.Description, s.Description, ss.Description, ss.Table FROM (((CATEGORYGROUPS AS cg LEFT JOIN CATEGORY AS c ON cg.GroupCode = c.GroupCode) LEFT JOIN SKILLS AS s ON (c.CategoryCode = s.CategoryCode) AND (c.GroupCode = s.GroupCode)) LEFT JOIN SUBSKILLS AS ss ON (s.GroupCode = ss.GroupCode) AND (s.CategoryCode = ss.CategoryCode) AND (s.SkillCode = ss.SkillCode)) LEFT JOIN SKILLSINAGES sia ON (cg.GroupCode = sia.GroupCode) AND (c.CategoryCode = sia.CategoryCode) AND (s.SkillCode = sia.SkillCode) AND (ss.SubSkillCode = sia.SubSkillCode) WHERE sia.EraCode LIKE 'ERANAME' AND sia.AgeCode LIKE 'AGENAME' ORDER BY cg.GroupCode, c.CategoryCode, s.SkillCode, ss.SubSkillCode;<br />


But I get an error in access that says the Join operation is not supported? Does anyone know what that means? (a completely different question) Does this design make sense?

Thanks!
GeneralRe: Help with SQL query Pin
Michael Potter28-Jun-04 7:07
Michael Potter28-Jun-04 7:07 
GeneralRe: Help with SQL query Pin
brdavid28-Jun-04 9:11
brdavid28-Jun-04 9:11 
GeneralRe: Help with SQL query Pin
Michael Potter28-Jun-04 10:37
Michael Potter28-Jun-04 10:37 
GeneralRe: Help with SQL query Pin
brdavid28-Jun-04 12:04
brdavid28-Jun-04 12:04 
GeneralRe: Help with SQL query Pin
Michael Potter29-Jun-04 8:55
Michael Potter29-Jun-04 8:55 
GeneralRe: Help with SQL query Pin
brdavid30-Jun-04 2:37
brdavid30-Jun-04 2:37 
GeneralRe: Help with SQL query Pin
Grimolfr28-Jun-04 9:58
Grimolfr28-Jun-04 9:58 
GeneralInserting Rows... Pin
Sai197125-Jun-04 19:59
Sai197125-Jun-04 19:59 
GeneralRe: Inserting Rows... Pin
Rein Hillmann26-Jun-04 22:11
Rein Hillmann26-Jun-04 22:11 
QuestionHow Can I Join more than two tables in SQL Pin
JawedVikia8024-Jun-04 21:40
JawedVikia8024-Jun-04 21:40 
AnswerRe: How Can I Join more than two tables in SQL Pin
Colin Angus Mackay24-Jun-04 22:03
Colin Angus Mackay24-Jun-04 22:03 
AnswerRe: How Can I Join more than two tables in SQL Pin
wgdesigner25-Jun-04 1:38
wgdesigner25-Jun-04 1:38 
GeneralConcurrency Pin
IamADotNetGuy24-Jun-04 10:04
IamADotNetGuy24-Jun-04 10:04 
GeneralRe: Concurrency Pin
Rein Hillmann26-Jun-04 22:13
Rein Hillmann26-Jun-04 22:13 
GeneralRe: Concurrency Pin
Grimolfr28-Jun-04 7:56
Grimolfr28-Jun-04 7:56 
GeneralRe: Concurrency Pin
IamADotNetGuy28-Jun-04 8:07
IamADotNetGuy28-Jun-04 8:07 
GeneralSQL Query Pin
Guinness4Strength24-Jun-04 9:39
Guinness4Strength24-Jun-04 9:39 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.