Solved

SQL Query - MS SQL server

Posted on 2014-02-06
6
339 Views
Last Modified: 2014-02-17
Hi,

I have to fetch data for below logic/requirement using tsql command. Could you please guide me what logic I have to apply for below requirement.

Requirement:
This request will be evaluated on a scale from 1 to 10
1-2=Very Bad, 3-4=Bad, 5-6=Neutral, 7-8=Satisfied, 9-10=Very Satisfied
QT = (DQ* 0.4) + (DR * 0.3) + (AT*0.3)
DQ = Deliverables (quotes)
DR = Deliverables (reports)
AT = Attitude
Reports would be evaluated on a weekly basis. If no issues are found, then rate 10, if issues are present then rate 5, if the same issue is till present the next week then rate 1.
0
Comment
Question by:sqldba2013
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 12

Expert Comment

by:Harish Varghese
ID: 39841238
What tables do you have? Please provide a note on them and their structure.
0
 

Author Comment

by:sqldba2013
ID: 39841258
We don't have physical tables for above requirement.

Can we fetch data using temp table(s)?
0
 

Author Comment

by:sqldba2013
ID: 39841260
Edit:

As of now there is no physical tables in DB for above requirement.

Please share SQL command (using temp tables) and later I will modify script with physical tables.
0
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 

Author Comment

by:sqldba2013
ID: 39841480
Can someone tell me how to make this query (logic)?
0
 
LVL 12

Accepted Solution

by:
Harish Varghese earned 500 total points
ID: 39841510
Hello,

You need to explain the requirement in detail:
This request will be evaluated on a scale from 1 to 10
Which request? What info do you have in this request?
What are DQ, DR and AT? Where do you want to store QT?
Reports would be evaluated on a weekly basis. If no issues are found, then rate 10, if issues are present then rate 5, if the same issue is till present the next week then rate 1.
Which reports? How do you know if there are issues?

-Harish
0
 

Author Closing Comment

by:sqldba2013
ID: 39864424
--
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question