Viewing 9 posts - 16 through 24 (of 24 total)
alorenzini (2/12/2008)
I haven't change anything in the Repromote proc, this is code as it now:ALTER PROCEDURE [consultantreports].[uspS_DownlineRepromotions2]
@CONSULTANTID VARCHAR(MAX)
AS
SET NOCOUNT ON
DECLARE @x XML
SET @x = ' '
Where do you assign the...
February 12, 2008 at 3:07 pm
Have you changed uspS_DownlineRepromotions2 in some way?
Try to run the uspS_DownlineRepromotions2 procedure separately in a query window with the same ConIds....
February 12, 2008 at 2:40 pm
Yes it is but if you change...
INSERT INTO #Temp(ConsultantID, AchieveLevel, AchieveTitle, PeriodEndDate, RepFlag)
EXEC uspS_DownlineRepromotions2 @ConIDs
It should work
February 12, 2008 at 1:47 pm
Is it possible that the parameter length in uspS_DownlineRepromotions2 is shorter?
In another post it was varchar(8000)
February 12, 2008 at 12:52 pm
Declaring a table variable (@C) may lead to performance problems because all rows you insert will be stored in memory...
You may try with a temp table instead.
CREATE TABLE #C(
ConsultantID CHAR(7),
Level...
February 12, 2008 at 11:17 am
Adam's solution seems more tested than mine...I'm sure it is 🙂 otherwise I think this will work...but be aware, it's not tested
Select c1.ConsultantID, c1.Level, c1.Title, c1.PeriodEndDate
from @C...
February 11, 2008 at 12:42 pm
You're correct...I didn't understand the issue...but...do I understand the issue now?
If you copy your own code in an earlier post...
Declare @C Table....
Some inserts....
Down to...Declare @r table...
February 11, 2008 at 8:35 am
Every column in the select list has to be in the Group By Clause except columns involved in aggregates. Ex:
Select A, B, C, SUM(D) as Dsum
from Table
Group By A, B,...
February 11, 2008 at 7:11 am
I would have used Group By and Having Clauses
Select Title, Max(PeriodEndDate) as PeriodEndDate
from YourTableName
group by ConsultantId, Level, Title
having Count(PeriodEndDate) > 1
February 11, 2008 at 6:02 am
Viewing 9 posts - 16 through 24 (of 24 total)