Solved

SQL Query - MS SQL server

Posted on 2014-02-06
6
309 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
Comment Utility
What tables do you have? Please provide a note on them and their structure.
0
 

Author Comment

by:sqldba2013
Comment Utility
We don't have physical tables for above requirement.

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

Author Comment

by:sqldba2013
Comment Utility
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
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 

Author Comment

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

Accepted Solution

by:
Harish Varghese earned 500 total points
Comment Utility
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
Comment Utility
--
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
C# SQL BULK INSERT CLASS 5 32
Calculating Business Hours 18 58
SQL Split character from numbers 3 15
Runtime 3044 error 14 9
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to shrink a transaction log file down to a reasonable size.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now