Viewing 15 posts - 2,086 through 2,100 (of 3,011 total)
select distinct *
from
tableA
where
-- Greater than or equal to yesterday at 00:00:00.000 (midnight)
h.created >= dateadd(dd,datediff(dd,0,getdate())-1,0)
-- Less than today at 02:00:00.000 (2am)
h.created < dateadd(dd,datediff(dd,0,getdate()),'02:00')
January 26, 2009 at 8:39 am
Ross McMicken (1/26/2009)[hr
From what I've read, this is mostly a call center workers issue. They seem to get the worst of it from all sides - management and customers. That's...
January 26, 2009 at 8:32 am
Sergiy (1/24/2009)
[created date] + GETDATE() - GETUTCDATE()
That really only works correctly if the [created date] is from the current date.
The OP posted an example date of '1/12/2004 7:04 PM'...
January 25, 2009 at 8:44 pm
Pat_B (1/24/2009)
January 25, 2009 at 12:21 am
Anything’s possible, but a DBA job is usually for someone with significant industry experience as a developer, administrator, or both, and usually a BS\BA degree. It’s more of a...
January 23, 2009 at 4:09 pm
You really need to look at the type of paging. There are many types of paging that have nothing to do with the page file. They can just...
January 23, 2009 at 12:11 pm
Back to the original question, I would speculate there were a lot of possible correct answers, and what the question was really about was probing your level of understanding of...
January 22, 2009 at 9:59 am
The only really valid test is with production levels of data in the tables.
I have used temp tables for things like this when it prevented SQL Server from choosing a...
January 22, 2009 at 9:46 am
Lynn Pettis (1/21/2009)
Garadin (1/21/2009)
Jeff Moden (1/21/2009)
Garadin (1/20/2009)
Michael Valentine Jones (1/20/2009)
We had a meeting where we objected to a project as complete waste...
January 22, 2009 at 9:29 am
This code generates 16 character, unique strings increasing in value. There may be gaps in the sequence.
See my last post for a link to the code for F_NUMERIC_TO_BASE_N .
declare...
January 21, 2009 at 6:05 pm
Using the function on the link below, this code will generate a random string that is highly likely to be unique.
However, the nature of random numbers is that they they...
January 21, 2009 at 5:39 pm
select top 4
a.*
from
(...query to select top 10, whatever that is...) a
order by
newid()
January 21, 2009 at 9:14 am
In the end, does the reason why really matter?
We had a meeting where we objected to a project as complete waste time and money, and were trying to talk our...
January 20, 2009 at 10:08 pm
I had requirements for a datamart application where we had to produce many reports with rankings within various hierarchies. Example: product sales ranked within departments, product categories, regions, stores,...
January 16, 2009 at 7:37 pm
Assuming you have a calendar table with all dates in it:
select
NextBusinessDay = min(a.MyDate)
from
MyDateTable a
where
a.MyDate > @MyStartDateand
a.MyDayOfWeek not in ('Saturday','Sunday')and
a.MyHolidayIndicator <> 1
If you need to load a calendar table, this code...
January 15, 2009 at 4:05 pm
Viewing 15 posts - 2,086 through 2,100 (of 3,011 total)