Solved

SQL Query - MS SQL server

Posted on 2014-02-06
6
320 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
  • 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
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

785 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