problem in accessing fields from table with multiple foreign keys referencing single primary key

i came accross requirement of multiple foreign keys in a tablereferencing the same primary key another table. i created the tablerelations using the relations editor in access. even though i couldhave multiple foreign keys to a table access did allow the referentialintegrity.my database structure istable1 - students tabletable 2 - subjects tabletable 3 - subjects opted by studentsin the table 3 totally there are 6 subject columns and a student canopt for variable number of subjects.table structurestudentsID -> primary key, FirstName, LastName, ........subjectsID->primary key, subjectstudent_subjectsID->primary key, StudentID->foreign key referencing students.ID, andsub1, sub2, .....sub6 all of which reference the primary key insubjects table.now if in the student_subjects table i have a record with dataID-1000, StudentID-100, sub1-1, sub2-2......sub6-6,how can i join table in SQL query to access the student_subjects tableso that i can display the result asID->studentID (name not required)but from sub1 to sub6 i should display the actual subject name that isin the subjects table ?for example :ID   sub1  sub2  sub3 ....... sub61000 telecom. cryptography networking .... cgi/perlthe one natural solution to this which i got from other groups isrestructuring the student_subjects table asID->primary key, StudentID-Fk, SubjectID-FkThe idea is to have many records here, instead of repeating fields. SoifStudent 24 enrols in subjects 2,4, and 7, you have records like this:    StudentID        SubjectID            24                2            24                4            24                7now for a student i have multiple records in the student_subjectstable with different ID (primary key), to view the entire records of astudent as a single record i need to refer to StudentID field.this can be used to further processing of data, but with this approachhow do i display the data in a flex grid as a single record for everystudent as given in above example ?
0
ravichoudhari
3/22/2007 3:39:08 PM
access 16762 articles. 3 followers. Follow

0 Replies
953 Views

Similar Articles

[PageSpeed] 52

Reply:

Similar Artilces:

Outlook 2003 PST problems
I just installed Office 2003 professional on a new computer & am having problems with outlook. I copied my Outlook.pst file into the appropriate directory & although it is recognized the calendar is not working properly. I cannot attach any of the colored labels to my appointments - so everything is pretty much in black & white. I totally uninstalled & reinstalled office... first removing my pst file... but there appears to be an ini file... or something that is retaining some information... does anyone know of a fix for the labels... or how to TOTALLY uninstall office (so I...

Access 97 executables and other versions of Access
I have a few questions regarding Access 97 and other versions of Access as we don't have time to develop .net versions of our Access 97 databases and some of our users are moving to other versions of Office/Access - I work for a local authority hence we tend to be very slow in moving to newer technology! We've tried converting our Access 97 databases (lots of front end forms) into Access 2000 but they fail and we don't want to install two versions of Access due to having our applications delivered via Novell to the user (PC's are locked down). Do we need to purchase...

Problem shortcuts in Word
Hello, I work with Word 2008. In the beginning there is no problem, but suddenly i have problem with shortcuts. When i want to do "cmd c" it make an other shortcuts same thing for "cmd s", "cmd v" and surly some other. But when i write there is no problem "c" is "c"... If somebody have an idea please help me. Thank you. Unless you indicate your specific update level of Office as well as OS X & describe what the keystrokes *are* doing contrary to what you expect there isn't much we can offer. -- Regards |:>)...

encoding problem in Outlook 2007 importing Outlook 2000 personal folders
I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese characters in the subject became unreadable but it's ok to display in message body. In Outlook 2000, there's no problem to display the Chinese characters in the subject. What's wrong with Outlook 2007? What setttings should I change to fix the problem? Thanks. cyl <u8526505@gmail.com> wrote: > I use Outlook 2007 to import the pst file of Outlook 2000. The Chinese > characters in the subject became unreadable but it's ok to display in > message body. In Outlook 2000, there's no problem t...

Problem with Authentication
The CRM application was running smooth. But now I can't logging. It ask my credentials and than return a 401.1 error. I had already reinstalled the CRM server but it won't work. I'm accessing it in the same local network. I'm running CRM 3.0 in SBS. Best regards, Erico Hi When you open a Internet explorer and type the name of the CRM server, it prompts for user and password ? Are you logged in with domain credentials ( AD user ) ? If you are, so add url of the crm server in Local intranet. Enable "Automatic logon only in intranet", this is under security,c...

Multiple e-mails #4
How many e-mails can be sent at once with outlook express Multiple e-mails wrote: || How many e-mails can be sent at once with outlook express This newsgroup is for support of Outlook 97/98/2000/2002/2003 from the Office suite of products. Outlook Express is actually a separate program despite the similar name. For help with your OE questions, try an OE newsgroup such as microsoft.public.windows.inetexplorer.ie6_outlookexpress (for OE 6), or an OE help website such as http://insideOE.tomsterdam.com. If you're accessing the Microsoft newsgroups through the MS Product Support Services &...

pivot table grand totals not showing for all columns...
i have a pivot table that shows the grand total for some columns, but not for others... there are no differences in the data layout, yet this happens? any clues as to why? and how I can get the grand totals to show for all fields. thanx in the PivotTable floating toolbar, click PviotTable, then Table Options, select 'Grand totals for columns' option. ...

Project 2007 Work Field Formula to Exclude Work Done by Resources Not in a Resource Group
I have a workshop task in my project schedule which is worked on by Resources from my company (Resource Group = VENDOR) and resources in the client's company (Resource Group = CLIENT). I need a formula to calculate WORK hours for ONLY the resources in Resource Group = VENDOR. I want to drop any hours that the CLIENT spends on the task and only calculate VENDOR hours. Does anyone have a formula? I am familiar with Project, but have not used formulas before. Could not find a formula to do this in any of the other forums on the net.. Thanks! +------------------------...

Vista blue screen problem...please help!
I've seen some other threads, here are the dump files: 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' (http://rapidshare.com/files/347103149/Minidump.rar.html) Please, help me out here. -- ceVil It might be better to know at what point the bsod occurs and what the actual err.msg given is "ceVil" <guest@unknown-email.com> wrote in message news:0b9a0c60b90bf6c0be88bda30f2820ab@nntp-gateway.com... > > I've seen some other threads, here are the dump files: > 'RapidShare: 1-CLICK Web hosting - Easy Filehosting' > (...

calendar problem
Dear all, I am using both mail and calendar function in outlook 2002. Everything is ok until recently, when I try to make a new appointment or checking any old appointments, an error message "out of memory or resource, try to close some windows..." pop up. The mail function is still ok. Can anyone tell me how can I solve this? I have already installed sp2. The version of office is the professional one with frontpage. Thanks. tp ...

SQL 2005 patition table
Hi, I have 20 million (5 type record ids -- 2-3gb)records need to be loaded into a table daily. Is it a good idea to have a a patiotion table seperated by reciord type id. 1. It will be faster for retrieval in performance? 2. What is the drawbacks ot have a partitioned table instead of regular table? Thanks, Mecn My opinion is 1) It will be fatser if the user searches on particular typeid , if he/she searches on typedid 1 and 5 then it will 'scan' two partitions 2) You have to have some experience to maintain partitons "Mecn" <mecn@yahoo.com> ...

problem #4
Hi, I am facing this new problem... i.e a user has installed Office 2003 on win2k prof platform.. whenever she is working on a outlook.. she gets a Microsoft error message... saying to send the report or don't send the report... Usually I have seen this problem in IE... But for outlook it is new to me... after clicking on send or don't send report.. the outlook closes. And there are no IE open..... and if atall it is open.. the IE does not close... Need your help regards, KAH What is logged to the Event Viewer regarding this? Try one of the following already; http://www.howt...

Access denied when forwarding
When I am working remote using webmail, after being logged on and receiving mail...when I try and forward a mail message I get a "access denied" error When I am logged on as a MAPI client....everything works fine. Any ideas? Thanks, Jeff ...

how to write vb code in access 2007
Version: MSAccess 2007 I have 3 fields in my database that contain currency. Field 1: PrincipleAmount Field 2: AmountPaid Field 3: AmountDue I have added a Command Button (cmdCalc) to the form. I need to write code that Subtracts Field2 from Field1 and returns the Balance in Field 3. I have no idea on how to gain access to and how to write code in MSAccess 2007. I can do this in VB6. Thanking You in Anticipation Julian On 15 dec, 13:29, tjbvo <tj...@discussions.microsoft.com> wrote: > Version: MSAccess 2007 > > I have 3 fields in my database that conta...

95 and 97 problem
For some unknown reason there is Excel 95 and 97 on this pc.When i double click on an Excel file, the pc defaults to the 95 program (Which incidently doesn't work properly). So my question is how do i get the pc to default to 97. Cheers Craig Craig, Have a look at Windows Help. From Windows 2000 Help (Index under Programs Associating with File Types) To change which program starts when you open a file In My Computer or Windows Explorer, on the View menu, click Folder Options. Click the File Types tab. In the list of file types, click the one you want to change. Click Edit. In Act...

Date problem
I can't believe there's no post on this, but I can't find it. I've tried the solutions I could find (see below) and still get the error: "The expression is typed incorrectly or it is too complex to be evaluated. For example....Try simplifying...." I have a date field, formatted as Date/Time, General Date, default Value = Now(). I like having the date and the time - in case we need it. I want to run a report on calls taken just for one day. I have CallDate: CallDateAndTime in my query, with "criteria" as Between ([Forms]![frmReports]![txtStartDate]) A...

sync problems
I have all of my info on an HP Ipac. I had to reformat the hard drive and I did not make a back-up file. I am trying to move everything back to the computer but it says there is an error with syncing it. How can I move everything from the PDA back to Outlook again? Please help- thanks ...

Office 2007 - HELP
I have used Word for many years and love it - not too thrilled with the changes in Office 2007, but my bigger issue is with Publisher 2007. I have an image that I have used in Word just fine - meaning, the on screen colors are correct and when printed the colors are correct. Someone sent me a Publisher file and asked me to add the image - I did this - now the image is messed up - the colors are correct on screen, but when printed FROM MY computer the image colors are all wrong - but if I transport the file to a different computer it prints fine I have reinstalled Office - no good Any id...

Installation Problem!!
I am having a problem installing MSCRM 1.2. My configuration consists of a Domain Controller running Win 2000 Server SP4 . I am trying to install MSCRM on a member of the domain running Windows 2000 Server SP4. There is a DNS Server on the DC which is integrated with AD, and a SQL Server 2000 running on the Win 2K machine. The install errors out when CRM creates the root business with the message: Setup was unable to install Microsoft CRM Server. Setup was unable to provision your organization. Setup was unable to create the root business. The configuration of ASP.NET seems to be ok, the pr...

Pivot Table #56
I am trying to create a Pivot table in Excel, using Microsoft Query linking to SQL database. SQL stores the date as Date/Time. It becomes impossible to group in Excel using Pivot Table, by date/time. I want to create a record in Microsoft query using the date field, but convert to Date only as dd/mm/yyyy and retain the format as Date and not as Text. I have tried Left(Date,11) and Convert(VARCHAR,1,101), none of them work. Could someone help me with the correct syntax. Microsoft query does not recognize MID. Thanks Krish ...

Problems Creating a disclaimer in Exchange 2003
I am trying to create a server based disclaimer that will stamp all of my smtp emails going to the internet. I have been following KB article 317680 with no luck. I get an error like the one below. Binding Display Name Specified: smtpscriptinghost ** Registration Failed ** Err.Number (HRESULT) = 0x1AD Err.Description = ActiveX component can't create object ProgID = cdo.ss_smtponarrival COM Category = {FF3CAA23-00B9-11d2-9DFB-00C04FA322BA} Corresponding Event = onarrival ** Have you registered your sink COM class on this machine? I am puttin...

Resource editor problems
Hello all, Under VC++ 7.1... Please consider these two lines: IDC_ARROW_ADD_CANCEL DISCARDABLE "res\\cur00004.cur" IDC_ARROW_ADD_CANCEL CURSOR DISCARDABLE "res\\cur00004.cur" The second is a hand-edited change to the first. Both will compile just fine in the resource compiler. However, after I use a text editor to make this change, I cannot open the .rc file in the resource editor. The resource editor issues the following error open attempting to open the .rc file: error RC2135 : file not found: CURSOR Can anyone shed light on what's going on here? Thanks, Dave ...

Using Checkboxes to add data to a table.
I have been having trouble developing this form for a couple of days. It seems the solution should be simple but so am I. I have an input form with four text boxes. I need to use the same data and create a new line in the table for up to but not always 9 different company positions. I was given a possible way of keeping the info on the form for the next position using the AfterUpdate event and setting the default back to the same box. But in using his suggestion I get #NAME? for the boxes with text when I select the next new record. The boxes with numbers come back the way he said it wo...

Directory Replication Problem #2
Hi, recently my Exchange Server directory database receives changes from other servers but does not send out its own changes. Check from the knowledge base, to correct the USN discrepancy need to use Authrest.exe (need to amke changes for about 100+ users). Does anybody know where to get this file 'Authrest.exe' for exchange server 5.5? Exchange server 5.5 CD only provide this file for ver.4.0. Have anyone use it before? Regards, "Sharon Tan" <sharon_tansk@yahoo.com.sg> wrote: >Hi, recently my Exchange Server directory database >receives changes from ot...

Software of scripting to grab data from MS word file and fill in Excel fields?
I have a 90 page financial report from MS word that I get each month. I would like to find a software package or scripting tool that will allow me to automate the process of grabbing #s from the ms word file and filling in fields in an excel file. I have a feel that there may be quite of programming involved in doing this. But perhaps there are some more efficient solutions out there. I would appreciate any advice. Thanks Hi, Do the numbers appear in the same part of the word document each tim (eg always in the same row/column of the same table). If so, copyin the data into excel should be ...