Viewing 15 posts - 9,121 through 9,135 (of 10,144 total)
ps (12/16/2008)
SELECT DISTINCT UserName
FROM tbl_PBN_debugging
WHERE DATEDIFF(dd, Logdate, GETDATE()) < 91
...how many rows do you get?
I hope tbl_PBN_debugging table contains only one row per user. LogDate field gets updated...
December 16, 2008 at 4:59 am
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...
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...
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...
December 16, 2008 at 1:42 am
Sunil, did you try my code?
December 16, 2008 at 1:21 am
i'm gonna stay carbon (dibaxide) neutral here
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?
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?
December 15, 2008 at 9:52 am
sognibene (12/15/2008)
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) /...
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...
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...
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...
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...
December 15, 2008 at 8:35 am
viji (12/15/2008)
December 15, 2008 at 8:11 am
Viewing 15 posts - 9,121 through 9,135 (of 10,144 total)