Viewing 15 posts - 76 through 90 (of 132 total)
I rewrote it so that it's only a single query with just the subquery in the WHERE clause. Damn thing took me all day to write with triple nested case...
February 16, 2009 at 4:43 pm
I guess if I had to guess, it's that the WHERE clause is applied after everything else. So the outer query has context in a subquery referenced in a WHERE...
February 16, 2009 at 4:15 pm
Thank you very much!
February 14, 2009 at 8:39 pm
You guessed correctly. I checked the logs and it logged the recovery process every step of the way allowing me to notify my users how long it would be down....
December 11, 2008 at 11:16 am
Fair enough Steve, that makes sense.
Yes the answer is that SQL Compare and SQL Data Compare do have a feature that allows you to "Map Owner". It really should...
December 10, 2008 at 12:59 pm
No it turns out you can do it and it works great.
I tried to delete this post an hour after I created it and before anyone could reply because...
December 10, 2008 at 8:30 am
I got it working. Disregard above post.
The problem was actually DNS. I was using a file share but for some reason DNS wasn't resolving for the server the file...
October 16, 2008 at 10:32 am
If I understand what you are after correctly, then you just need to join from that table to itself like this:
SELECT a.TransactionDate, a.AccountID, a.PointsEarnedTotal, b.PointsEarnedTotal as 'YesterdayPointsEarnedTotal'
FROM #PointBalTotal a
JOIN...
October 15, 2008 at 11:40 am
Thanks to both of you, that was the solution to my problem. I failed to enable outbound transactions on the server I am pulling the data into.
September 26, 2008 at 12:46 pm
I apologize, I had something in my head that doesn't work: I was thinking you could put the dynamic sql in a user defined function, then make a view that...
May 9, 2007 at 9:34 pm
I'm thinking something like this:
ALTER FUNCTION [dbo].[dateSinceString]
(
@pastDate DATETIME
)
RETURNS VARCHAR(100)
AS
BEGIN
DECLARE @returnString VARCHAR(100)
DECLARE @timeUnitCount INT
SET @returnString = ''
SET @timeUnitCount = 0
DECLARE @numYearsAgo INT
SET @numYearsAgo = DATEDIFF(YEAR, @pastDate, GETDATE())
IF @numYearsAgo > 0...
May 9, 2007 at 12:05 am
You can create a string, and then create if statements that check if the datediff for each unit of time you are interested in is greater than zero. If it...
May 8, 2007 at 11:37 pm
Carla, I use this all the time but I didn't know you could have it refresh automatically when they open the excel file. Currently I have it such that you...
May 8, 2007 at 11:05 pm
I don't know your exact problem, but I just wanted to say, I've never encountered any relational database problem that absolutely had to be solved by a stored procedure that...
May 8, 2007 at 10:51 pm
So to get how many minutes ago the post was, you'd use something like this:
DATEDIFF(minute, @dateOfPost, GETDATE())
May 8, 2007 at 10:42 pm
Viewing 15 posts - 76 through 90 (of 132 total)