Data Access :: How To Compute Student Grade In Server
Nov 21, 2015
i am having problem putting this query to calculate students grade using the condition and legend bellow.
WHEN EXAMS BETWEEN 75 AND 100 THEN 'A'
WHEN EXAMS BETWEEN 70 AND 74 THEN 'AB'
WHEN EXAMS BETWEEN 65 AND 69 THEN 'B'
WHEN EXAMS BETWEEN 60 AND 64 THEN 'BC'
We have SQL database now a days we are planing to update our students ID Records but i don't know the exact query for this. Table format is below
StudentID Name 500132253/Prep Aslam 112344883/Prep Ali 451132537/Prep Ahmed
Now i want to update only the grade from prep to KG-1 without update the registration number only prep to kg-1. in one column there is student register number and after slash the grade.
Grade_letter lowbound_marks uperbound_marks A 85 100 B 60 84 C 0 59
Suppose some another query returns marks.Now, I am stuck with the query which takes the grade_letter based on the marks falling in the range given above. I want a query which is not hardcoded and calculates the grade based on the values given in the table only.
I have three coloumn in Salary Table Emp ID, Emp Salary , Sequence a1 1000 1 a1 2000 2 a1 2000 3 a2 4000 1 a2 5000 2 a2 5000 3 a2 6000 4
Now I have to calculate the count on salary if the previous salary is different then count +1 else is previous salary same then add +0. so output be EmpID and Updation in Salary a1 = 2 and for a2 =3
Can anyone help me with the query or storeprocedure i can achieve this output counting according to previous data.
I can fetch the counts for total present and absent
Query i have tried is
Declare @StudentId Uniqueidentifier ='0B2D4D41-8D33-4D79-A981-03E0F093F458' Begin select A.StudentId ,A.Date,Count(Date)Total,B.Guid,
[Code] ....
AS result of this query i get the data.Present count and Absent count from date inserted in Dailyattendance tables.
SO my problem is if the student have promoted to next class then by this query it will count the before year also how do i need to calculate the count according to the Class StartDate and Enddate as i mention in the Class Details table what will be the query.
Need to calculate the Grade age based on the birthdate and Nov month and 30th Day of the current year. I have a working datediff statement but I need to always but in the current year. I would like to have the statement get the current year. Then if the age is greater than xx and less than xx your age level is "xyz"
This works DateDiff("d" [Birthdate], 11/30/2004) /365.25 will return the age.
I want to replace the 2004 with a getdate yyyy so I do not need to maintain this statement.
I'm trying to think a way to map an average rating (1-10) to a letter grade (A-F).
For example, if I querry the name of a professor and the corresponding rating for the professor, then I would also like to generate a column displaying the corresponding letter grade for the professor based on the rating.
Professor | Rating | Grade |
Smith 8.5 B
I use an aggregate function to diplsay the rating. I'm thinking I may need to write my own aggregate function to display the letter grade. 'Professor' is an actual field of the database.
I have recently upgraded to SQL2014 on Win2012. The Access front end program works fine.
But, previously created Excel reports with built in MS Queries now fail with the above error for users with MS 2013. The queries still work for users still using MS 2007.
I also cannot create any new queries and get the same error message. If I log on as myself on the domain to another PC with 2007 installed it works fine, so I don't think it is anything to do with AD groups or permissions.
I've been developing desktop client-server and web apps and have used Access and SQL Server Standard most of the time. I'm looking into using SQL CE, and had a few questions that I can't seem to get a clear picture on:
- The documentation for CE says that it supports 256 simultaneous connections and offers the Isolation levels, Transactions, Locking, etc with a 4GB DB. But most people say that CE is strictly a single-user DB and should not be used as a DB Server. Could CE be extended for use as a multi-user DB Server by creating a custom server such as a .NET Remoting Server hosted through a Windows Service (or any other custom host) on a machine whereby the CE DB would run in-process with this server on the machine which would then be accessed by multiple users from multiple machines?? Clients PCs -> Server PC hosting Remoting Service -> ADO.NET -> SQL CE
- and further more can we use Enterprise Services (Serviced Components) to connect to SQL CE and further extend this model to offer a pure high-quality DB Server? Clients PCs -> Server PC hosting Remoting Service -> Enterprise Services -> ADO.NET -> SQL CE
Seems quite doable to me, but I may be wrong..please let me know either ways
When i am trying to start our hospital software based on SQL server 2000, it shows Following Error.Search Condition is not valid, (DBNETLIB) Connection Open (connect()). SQL server does not exist or excess denied. Due to Fetch data.I run our software in Windows 8.1, while it smothly runs in previous version of Windows XP and 7.
i'm currently a student in computer information sciences, and i wanted to give my studying some more focus thus choosing dba. now i'd like to dba but be as broad as possible when i first start out my career. i know some programming languages and recently finished a C# book for doing .net development and a ASP.net book for scripting. but where should i go from here? should i just start studying ms sql server? what about a microsoft certification? i'm very curious to know where the next step in my studying should be, so anyone who was in my shoes, i'd love to hear any information you have to offer. TIA
Hi,I'm finishing up a beginning SQL class where we learned on an Oracledatabase and the transition to working on SQL Server is easy. The next moreadvanced course will be in PL/SQL, but I know I will be working on SQLServer in the workplace, so my question is if I should take this course.Will I benefit from the basic philosophies that will be covered, or will itjust make a transition for me more difficult? Will it be partly a waste oftime and money and I'd be better served getting a book and self teachingmyself? I know that in a greater sense learning something isn't necessarilya waste, but I mean from the perspective of my goal of being able to use SqlServer, will this course be useful?thanks.
I am starting a class on SQL Server, and my school wants me to builddb's either on campus or remotely at my home connecting to their SQLServer Enterprise.Will I be okay to use Developer Edition at home to connect with anEnterprise-licensed SQL Server on campus, to build databases,sprocs, .net apps that connect to the database stored on my school'sserver?I would rather avoid the Express edition.thanks
is there a step by step paper to get there? here is what i need to consider. I Iwill have many customers that will need their own set of records and access pages "branded for their company" each customer will have many clients. I am hosting this application on a windows 2003 server with SQL 2005 server enterprise.
I am using windows authentication, I have created a username in windows, then i added the windows user in SQL management studio in security, granted "DB Read" and "DB write" and again under the database security tab. still from the web authentication fails. i must be nissing a step or two?
I expect to set up a username for each database as i setup new customers.
I have two database(MYDB1 , MYDB2) on two different server's(SERVER1 , SERVER2) . I want to create an store procedure in MYDB1 on SERVER1 and get some data from a table of MYDB2 on SERVER2. How can i do this?
I'm trying to re-write my database to de-couple the interface (MS Access) from the SQL Backend. As a result, I'm going to write a number of Stored Procedures to replace the MS Access code. My first attempt worked on a small sample, however, trying to move this on to a real table hasn't worked (I've amended the SP and code to try and get it to work on 2 fields, rather than the full 20 plus).It works in SQL Management console (supply a Client ID, it returns all the client details), but does not return anything (recordset closed) when trying to access via VBA code.The Stored procedure is:-
USE [VMSProd] GO /****** Object: StoredProcedure [Clients].[vms_Get_Specified_Client] Script Date: 22/09/2015 16:29:59 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON
I run SELECT statement with a COMPUTE clause,columns in the select list overrides on aggregate functions in COMPUTE clause. why was overrided? how show output COMPUTE clause? SELECT NUMBERFROM Table_1COMPUTE AVG(NUMBER) Result: NUMBER 1 56 78 89 56
I have one column in SQL Server 2005 of data type VARCHAR(4000).
I have imported sql Server 2005 database data into one mdb file.After importing a data into the mdb file, above column data type converted into the memo type in the Access database.
now when I am trying to import a data from this MS Access File(db1.mdb) into the another SQL Server 2005 database, got the error of Unicode Converting a memo data type conversion in Export/Import data wizard.
Could you please let me know what is the reason?
I know that memo data type does not supported into the SQl Server 2005.
I am with SQL Server 2005 Standard Edition with SP2.
Please help me to understans this issue correctly?
I'm a kid and I'd like to know what kind of work a database administrator does. It would be great to learn from a real database administrator how you spend your typical day at the office. What are some of your main duties? Thanks so much in advance.
I have a SQL table that consists of columns A, B and C. I am trying to construct a view consisting of all columns (i.e. A, B, C) and a computed column. This computed column has the following logic: If B is blank or null then NewColumn = A + ' - ' C else NewColumn = A + ' - ' + B I am just wondering how the SQL statement should look like....
Hi Guys, got a problem. I am trying to create a table of summarized fees. I was unable to do a Insert command so I settled for an Update command. But I ran into this error msg which I’m not sure how to fix. Can anyone see the problem or is it not even possible to Update and Compute in the same statement? Do I have to do a sub query?
Update FEE_SUMs_20080402 SET LOAN_Num = F.DDLOAN, Fee_Amt = F.DDMFEE FROM FEE_Recs AS F INNER JOIN dbo.Addr_20080402 ON Account_Num = F.DDLOAN ORDER BY F.DDLOAN COMPUTE SUM(F.DDMFEE) BY F.DDLOAN
Msg 156, Level 15, State 1, Line 7 Incorrect syntax near the keyword 'ORDER'.
I need to calculate average of each student and then get the highest.
My try:
Code: SELECT Students.StudentId,Students.StudentName,AVG(Grades.Grade) AS avg_grade FROM Students s JOIN Grades g ON Grades.StudentId =Students.StudentId GROUP BY Students.StudentId, Students.StudentName
ORDER BY avg_grade LIMIT 1 FROM Students;
I encounter problem with this code, maybe it's Completely wrong...
CREATE TABLE [dbo].[Student]( [StudentNumber] [varchar](50) NOT NULL, [Name] [char](50) NOT NULL, [Contact] [int] NOT NULL, [Address] [char](50) NOT NULL, [DateOfBirth] [datetime] NOT NULL, [YearEnrolled] [int] NOT NULL, [Year] [int] NOT NULL;
And insert the following data:
INSERT INTO Student VALUES('IT123456X', 'Ahmad Adam','05-18-1997', '33 Mangis Rod', 19970518, 2013, 1); INSERT INTO Student VALUES('IT334455U', 'Mary Tan', '01-23-1996', '51 Koon Seng Road', 23-01-1996, 2012, 1); INSERT INTO Student VALUES('BS123456X', 'Samuel Lee', '03-30-1997', '2 Joo Chiat Lane', 30-03-1997, 2013, 1); INSERT INTO Student VALUES('BS234234Z', 'Nathaniel Koh', '12-08-1997', '5 Stll Road', 08-12-1997, 2013, 1); INSERT INTO Student VALUES('BS987987F', 'Siti Faridah', '07-04-1995', '3 Duku Road', 04-07-1995, 2011, 3)
How do i calculate the age and how can i group by the StudentNumber like 'IT%'
i have this query and would like to have a sum for each column. how can i phrase the compute line please ?
select office as Office , Sum(Case (role) when 'ebp' then 1 else 0 end) as 'EBP' , Sum(Case (role) when 'support' then 1 else 0 end) as 'Support' , Sum(Case (role) when 'Awaiting Disposal' then 1 else 0 end) as 'Awaiting Disposal' , Sum(Case (role) when 'Interview Room' then 1 else 0 end) as 'Interview Room' , Sum(Case (role) when 'Sch Drop In' then 1 else 0 end) as 'Sch Drop In' , Sum(Case (role) when 'Sch CX Staff' then 1 else 0 end) as 'Sch CX Staff' , Sum(Case (role) when 'Not in Use' then 1 else 0 end) as 'Not in Use' , Sum(Case (role) when 'Public' then 1 else 0 end) as 'Public' , Sum(Case (role) when 'IAG' then 1 else 0 end) as 'IAG' , Sum(Case (role) when 'Delivery' then 1 else 0 end) as 'Delivery' , Sum(Case (role) when 'NVQ Use' then 1 else 0 end) as 'NVQ Use' , Sum(Case (role) when 'Hot Swap Spare' then 1 else 0 end) as 'Hot Swap Spare' , Sum(Case (role) when 'Archived' then 1 else 0 end) as 'Archived' , Sum(Case (role) when 'Network Infrastructure' then 1 else 0 end) as 'Network Infrastructure' , Sum(Case (role) when 'Unknown' then 1 else 0 end) as 'Unknown' , Sum(Case (role) when 'Drop in Centres' then 1 else 0 end) as 'Drop in Centres' , Sum(Case (role) when 'Training' then 1 else 0 end) as 'Training' from tempassets2 group by office, role order by office
How to display sql compute sum command their result in amount and qty in report?
I am try this query is successful show the total amount and qty in studio management server and show in screen. But run this query on report is without to show last column of qty and amount, why ?