Viewing 15 posts - 1,306 through 1,320 (of 1,838 total)
Kazmerelda (10/25/2016)
Eric, I think you could be right here I am a belt and braces person and I don't overspec...
October 25, 2016 at 8:36 am
HanShi (10/24/2016)
...WHERE x.evntTime > cast(GETDATE()-1 as date)
since evntTime seems to be DATETIME datatype, wouldn't that leave an implicit conversion in the execution to compare it to the calculated DATE value?...
October 25, 2016 at 7:23 am
The DATE and TIME datatypes weren't introduced until SQL Server 2008, if you want the same query to work in 2005, you will have to stick with the combined DATETIME...
October 24, 2016 at 8:28 am
Ed Wagner (10/24/2016)
Gary Varga (10/24/2016)
Ed Wagner (10/22/2016)
...Who doesn't do performance tests before releasing something to production?...Surprisingly many. Too many.
Sadly, you're probably right.
Where I'm at now, as the DBA I've had...
October 24, 2016 at 7:34 am
if you want the date in the results for the CLOCK_IN and CLOCK_OUT columns then maybe you don't want to cast them to TIME datatype like I did in the...
October 24, 2016 at 6:54 am
OK, this is the best I could come up with, but this won't handle very well the case where there is a missing CLOCK_OUT, I'm brute force picking the first...
October 21, 2016 at 2:32 pm
it's been a while since I've upgraded my home computer equipment, most of you would laugh if I posted specs. Something I did purchase and setup last year was...
October 21, 2016 at 9:47 am
Talvin Singh (10/21/2016)
the first line are categories, which were created with case statements egcount(case when [order line] = 1 then 1 end) [1]
Maybe I'm missing something, I'd have to...
October 21, 2016 at 8:02 am
camiloecheverry11 (10/20/2016)
...FROM dbo.inv_mast inv_mast, dbo.item_location_view item_location_view
WHERE inv_mast.item_id = item_location_view.item_id AND ((item_location_view.qty_on_hand>=0) AND (item_location_view.qty_allocated>0) AND (item_location_view.qty_backordered>0))
it's difficult to say without knowing the query inside of item_location_view, but my initial guess would...
October 20, 2016 at 1:24 pm
I don't think there's a definite answer, but Microsoft does provide some guidance on when to store things directly in the database vs using something like FILESTREAM which stores it...
October 20, 2016 at 1:14 pm
this sounds like a job more for PowerShell than SQL Server. SQL Server only has limited functionality for file processing.
https://gallery.technet.microsoft.com/scriptcenter/Delete-files-older-than-x-13b29c09
October 20, 2016 at 12:17 pm
OK, for this day the data looks right, there must be previous days where there are more CLOCK_IN events than CLOCK_OUT events for person_num 00010079, because the cross tab pivoted...
October 20, 2016 at 8:59 am
using your UtcToLocal function and the first query I posted yesterday, I get these results (note I'm in U.S. Eastern Daylight Time or -240 minutes)
event_date person_num full_name CLOCK_IN1 ...
October 20, 2016 at 7:29 am
I also don't get the same results for the data you've shown. Here's my complete test setup with your sample data:
CREATE TABLE TEST (creation_date datetime, event_name varchar(10), person_num int,...
October 19, 2016 at 1:43 pm
I'm able to create this function and add it to my test database fine, I'm not sure what problem you had:
WITH Prep AS
(SELECT dbo.UtcToLocal(creation_date) AS creation_date, CAST(DATEADD(hour,1,dbo.UtcToLocal(creation_date)) AS date) AS...
October 19, 2016 at 1:22 pm
Viewing 15 posts - 1,306 through 1,320 (of 1,838 total)