Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

Report Conversion from Sqllite to SQL Server

$
0
0

Good Day,

I need some help with a query, i'm currently running this in sqllite - using spiceworks reporting

---This report is written to ensure that all admin doesnt have a ticket that is not commented on over 7 days.

SELECT ''||tkt.id||'' as Tkt_no,

techlist.first_name||' '||techlist.last_name as Tech_assigned,

Summary As Summary,

tkt.created_at As Ticket_Created_Date,

commenterList.first_name||' '||commenterList.last_name as Last_Commenter,

max(com.created_at) AS 'Latest_Response_Date',

com.body as Latest_Comment_Made

FROM tickets tkt

---Joining table: comments with table: ticket in order to get the last comment made on ticket

INNER JOIN comments com ON tkt.id = com.Ticket_ID

---Joining table: Users with table: comments in order to get the first&last Names of the admin assigned to ticket

INNER JOIN users techlist on tkt.assigned_to=techlist.id

...


Viewing all articles
Browse latest Browse all 4871

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>