0

Hi, does anyone familiar with sql database on visual studio?. I need a little help on that.

The user can input the data, and the data has been stored into the database. Then, i want to use the data stored along with another data in another table to make some calculation. The idea is, user can input assessments mark for each subject, and it will generated the total marks and grade then it will be stored in the database. After the user input those (for few subjects) I want to retrieve the data to calculate the gpa. Basically I focusing on the grade and I have another table which I store the credit hours and points for each grade (grade as primary key). I got stuck how to connect those table should I just use if else statement. And should use the formula directly in buttonClick or in stored procedure or ?? Would be grateful if someone can help me on that. Thanks

23rd Mar 2021, 10:27 PM
Amy
3 Respuestas
0
if you are trying to run a sql query it would look something like this: select a.field*b.field as “calculated_field” from table1 as a join table2 as b on a.id = b.id you have to option to turn this into a view or insert into a table using stored procedures. someone might be able to provide more help if you provided examples of the two tables, the calculation you are trying to do, and if you also wanted to insert the calculated data into another table or something else.
23rd Mar 2021, 11:20 PM
you are smart. you are brave.
you are smart. you are brave. - avatar
0
Can I show you the details bout that if you don't mind? I have updated the idea about the project if you can have a little idea about it please let me know. thanks
24th Mar 2021, 2:42 AM
Amy
0
yes.
24th Mar 2021, 4:30 AM
you are smart. you are brave.
you are smart. you are brave. - avatar