Viewing 14 posts - 1 through 14 (of 14 total)
Made some modifications with CTE, but still no LUCK ...
Thanx in Advance ...
SELECT DATEADD(mm, (QUARTER - 1) * 3, year_date) StartDate,
DATEADD(dd, -1, DATEADD(mm,...
May 19, 2014 at 12:36 am
Finally got something Working ...
SELECT A.UserID, A.FullName, ISNULL(B.TotalSignups,0) AS TotalSignups, B.Month FROM
(
SELECT UserID, FullName
FROM tblGen_Users
WHERE GroupID = 4
) AS A LEFT OUTER JOIN
(
SELECT SignedByUserID, COUNT(1) AS TotalSignups, DATENAME(Month, SignupDate) AS...
May 4, 2014 at 1:41 pm
COALESCE will work if the query returns a NULL value, but the thing is; in my actual case it's not returning.
May 4, 2014 at 1:32 pm
It's just the SignedByUserID, that for Bilal Mateen does not exists in tblMer_Outlet, so we can change it to B.UserID from tblGen_Users, both are the same, but that not concern...
May 4, 2014 at 1:03 pm
I've make this Fiddle and is running fine, I don't get it where is the problem:
May 4, 2014 at 12:29 pm
Lynn Pettis! The 2nd Query is just for reference, that what I'm trying to get into the results. My main Table is tblGen_Users and UserID is PK, I've tried every...
May 4, 2014 at 11:43 am
Thank you ChrisM@home
I really need to update, the statement works perfectly.
Thanks to you all.
March 3, 2014 at 12:37 am
Thank you Jeff Moden
The explanation really helped, no need to store the Counter phrase into the database, I can display it on run-time, I didn't really know about the:DENSE_RANK()
as mentioned...
March 3, 2014 at 12:32 am
Hi Jeff Moden
1st alteration will allow to store the Counter values in CounterDesc as an INT or BigINT depends on the records (I got 1 Million and increasing), so I...
March 2, 2014 at 12:03 pm
Perry Whittle Thanx for the help :-).
March 2, 2014 at 10:01 am
Thanx ChrisM@home :-), that really helped, check out the following statement:
SELECT DISTINCT TerminalNo, MerchantNo
INTO #tblGen_TermCounter
FROM tblRPT_TXNDetails;
ALTER TABLE #tblGen_TermCounter ADD CounterDesc BIGINT;
WITH Updater AS (
SELECT CounterDesc, CounterNo = ROW_NUMBER() OVER(PARTITION BY...
March 2, 2014 at 9:59 am
It worked ... 😀
Really Thanx ... Gianluca
July 15, 2009 at 10:52 pm
Thanx |Ten Centuries| This is much helpful
But I am facing another thing which is a bit complex, I have to run the following procedures in the same I have mentioned...
June 18, 2009 at 12:10 am
Viewing 14 posts - 1 through 14 (of 14 total)