Can someone help and show me how to display using (VB.net) these two tables combined into one. I'm really struggling trying to figure this out after hours of work, I decided its time to ask for help!
So in SQL Server 2005 I have the following tables...
Students
PKId
Cart_Id
Fname
Lname
Credits (will not always equal one)
Items_Ordered
PkId
Cart_Id
Product_Id
Quantity (will always be one)
The following is what has to happen...
The total amount of credits should always equal the total quantity of items ordered for that Cart_Id.
Now, the amount of Students there are for each purchase will vary from 1 - 4 and the credits need to be distributed evenly.
If there is an uneven Quantity versus Student count, then the credits will be allocated from top to bottom, adding an extra to each
of those students.
So when it comes down to it, I need Students.Fname and Students.Lname put into each line of the Items_Ordered table for that Cart_id, distributed evenly.
I would really appreciate any help on this, as I am almost brain dead now.
Thanks!