good day, im practicing databases and .net, can you help me in relating multiple tables and manipulating a listview?
my scenario is about school subjects of a student, i have a database with data that has 2 tables, which is 'fnsh_table' and 'ofrd_subjects'
fnsh_table
Student_No nchar(4)
Subj_No nvarchar(10)
Title nvarchar(20)
Remarks nvarchar(6)-- either 'passed' or 'failed'
ofrd_subjects
EDPCode nchar(8)
Subj_No nvarchar(10)
Title nvarchar(20)
Time_begin time
Time_end time
Units nchar(1)
RmNo nchar(3)
Days nvarchar(3)
Prerequisites nvarchar(30)
heres a part of whats inside my tables.
fnsh_table
Student_No, Subj_No, Title, Remarks
3432 IT10 Programming 1 Passed
3432 IT11 Programming 2 Passed
3432 IT13 Programming 3 Passed
3432 Hist1 History 1 Failed
ofrd_subjects
EDPCode,Subj_No, Title, Time_Begin, Time_End, Units, RmNo Days, Prerequisites
51232134 IT10 Programming 12:30 PM 3:30 PM 3 219 MWF
45464323 IT11 Programming 2 10:30 AM 11:30 AM 3 218 MWF
99932311 Hist1 History 1 5:30 PM 6:30 PM 2 113 TTH
12736238 IT14 Multimedia 1 7:30 AM 8:30 AM 3 510 MWF Programming 1, Programing 2
29472631 IT15 Animation 9:30 AM 10:30AM 3 201 TTH Multimedia 1
92846341 IT18 COBOL 1:30 PM 2:30 PM 3 410 TTH Programming 1, Programming 2
72631923 IT20 File Org 9:30 AM 10:30AM 3 222 TTH COBOl, Programming 1, Programming 2
92345155 Soc 1 Social Sci 10:00 AM 12:00PM 3 101 MWF Hist1
31238912 Pol Sci Political Sci 12:45 PM 2:45 PM 3 333 SAT Soc 1
In my form, when i enter the student id number on a texbox, it will show to my listview1 what subjects he/she has already taken, and in my listview2 displays the offered subjects
can u please gve me an sql for my listview2 that filters out the subject already taken by the student...? pliz :(
And second is i want to display to my listview2 the only subjects that has prerequisites taken by the student with remarks
of 'passed', if not passed that subject will be offered again. what sql will i use? :(
im sorry i dont have sql sample yet, im confused on how to relate the tables...:(
Any advice is deeply apreciated.. THANK YOU :)