Viewing 15 posts - 9,121 through 9,135 (of 10,143 total)
Hi Sunil
Give this a try...SELECT DISTINCT UserName
FROM tbl_PBN_debugging
WHERE DATEDIFF(dd, Logdate, GETDATE()) < 91
...how many rows do you get?
This is "the number of users who have logged on within...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 16, 2008 at 4:29 am
Hi David
Your question is answered here:
Because the ODBC-Driver makes "{fn CURDATE()}" beeing a char datatype the
conversion of "2006-08-01" to number results in an expression witch can be
convertet to "2006-01-08" as...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 16, 2008 at 1:56 am
Hi Sunil
Please read the link at the bottom of my post, it will show you how to write table creation scripts and insert statements to provide forum users with sample...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 16, 2008 at 1:42 am
Sunil, did you try my code?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 16, 2008 at 1:21 am
i'm gonna stay carbon (dibaxide) neutral here
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 1:59 pm
This is a longshot Michael and I apologise if "sucking eggs" comes to mind...does 2008 have timediff / timeadd functions?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 9:55 am
Panks (12/15/2008)
Resolved...Used a simple try catch block...
Thanks a lot anyways...
Which setting was it, Panks?
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 9:52 am
sognibene (12/15/2008)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 9:47 am
Panks (12/15/2008)
One of my proc uses the below script:
SET ARITHABORT OFF
UPDATE Prubond_MVR_Calc
SET MVRpct = (1- SFSurVal * (1 + Leeway) /...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 9:42 am
You're welcome. I ran a quick test of both methods with a date range of nearly 40,000 days
DECLARE @StartDate DATETIME, @EndDate DATETIME
SET @StartDate = '12/1/1900'
SET @EndDate = '12/5/2009'
and both methods...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 9:28 am
viji (12/15/2008)
Thanks chris. nice explanation.Could you please suggest some thing to get best performance on this??
thanks
regards
viji
It's impossible to tell without knowing more about your tables, viji. Here's an alternative...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 9:17 am
If you have a tally table, then this works a treat:
[font="Courier New"]SET DATEFORMAT MDY
DROP TABLE #myBalances
CREATE TABLE #myBalances (
[TranDate] DATETIME,
[TransactionAmount] money,
[Balance] money)
INSERT INTO #myBalances VALUES ('12/1/2008',100,100)
INSERT INTO #myBalances VALUES ('12/3/2008',-60,40)
INSERT...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 8:58 am
If you remove the unwanted conditions from the expression, then it's easier to see how it works...
WHERE locationkey IN (
SELECT locationkey
FROM dbo.ClientTbl_DimStores
WHERE...
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 8:35 am
viji (12/15/2008)
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 8:11 am
'Welcome Seth 🙂
For fast, accurate and documented assistance in answering your questions, please read this article.
Understanding and using APPLY, (I) and (II) Paul White
Hidden RBAR: Triangular Joins / The "Numbers" or "Tally" Table: What it is and how it replaces a loop Jeff Moden
December 15, 2008 at 6:56 am
Viewing 15 posts - 9,121 through 9,135 (of 10,143 total)