Viewing 15 posts - 346 through 360 (of 13,429 total)
this does what you are asking, I guess:
this assumes your a ticket is always opened and always closed, and forces an order via the Row_number so i can join...
July 31, 2017 at 1:00 pm
no, your post is relevant, no worries.
Every year, I help with the same style of project I mentioned above, and I ask around before I program something.
I've already...
July 31, 2017 at 12:34 pm
you are missing the SET statement, it looks like to me.
Could you try this format instead?
DECLARE @s_FilePath nvarchar(255) = '' ;
SET @s_FilePath = 'what '...
July 31, 2017 at 12:16 pm
Phils logic looks like it will still work.
I converted your paste to consumable data
;WITH MyCTE([TicketHistoryID],[TicketID],[DateTime],[Name],[TicketActionID],[ID1],[ID2],[TicketStateID],[TicketBoxID],[OwnerID],[PriorityID],[TicketCategoryID],[Myrow])
AS
(
SELECT CONVERT(int,'57440055'),CONVERT(int,'6702938'),CONVERT(datetime,'7/14/17 1:34 PM'),CONVERT(VARCHAR(30),NULL),CONVERT(int,'1'),CONVERT(int,'284'),CONVERT(int,'0'),CONVERT(int,'2'),CONVERT(int,'327'),CONVERT(int,'0'),CONVERT(int,'1'),CONVERT(int,'1'),CONVERT(int,'1') UNION ALL
SELECT '57440833','6702938','7/14/17...
July 31, 2017 at 10:36 am
OK answering my own question, my assumption was wrong. the count is an approximation. it is not 100% accurate.
https://docs.microsoft.com/en-us/sql/relational-databases/system-dynamic-management-views/sys-dm-db-partition-stats-transact-sql