Viewing 15 posts - 196 through 210 (of 258 total)
That worked thanks. But I would like to here more about how to do it faster. Maybe with the derived table that was mentioned.
January 31, 2008 at 7:06 am
So how would I fix it?
ConsultantID and the SponsorID are in the same record.
January 31, 2008 at 6:48 am
I am at a bit of a loss here. I think I understand what you are saying but not sure how to go about writing it.
January 31, 2008 at 6:26 am
Thank you very much that worked out great!!!:w00t:
January 30, 2008 at 11:50 am
The @perioddate is a parameter being passed in. This version of the code is for testing but if I change the @perioddate to a date say from last month the...
January 30, 2008 at 8:50 am
I think you miss read the code
IF (@GreaterThan IS NOT NULL) AND (@LessThan IS NULL)
SELECT @And = ' AND MonthToDate_Total >= ' + CONVERT(VARCHAR(20),@GreaterThan) + ' '
ELSE IF (@LessThan...
January 25, 2008 at 10:35 am
so all my filters would be come a union?
January 25, 2008 at 9:54 am
based on the inpout from everybody I think I need tro find another way to do this. What I need is to have two record set returned. One will have...
January 25, 2008 at 8:30 am
I am being duuhhhhhh! The whole issue resolved itself when I lengthen the @status variable from 10 to 20. The blessed variable wasn't long enough. Thanks for everybodys...
January 22, 2008 at 3:53 pm
I think I see what is happening, if the StatusID does not having a matching record in the table it is returning all Actives instead of an expected NULL recordset.
January 22, 2008 at 1:32 pm
I changed the filter to look like this:
IF (@Status = 'Grace')
BEGIN
SET @SQLStr = 'SELECT * FROM #DLFiltered WHERE Active = 1 '
Set @SQLStr = @SQLstr + 'AND StatusID' +' =...
January 22, 2008 at 12:27 pm
Upon further investigation, I don't think the IF statements are working or the string concatenation is not doing it job:
Code:
IF (@Status = 'Grace')
Select @SQLStr
--SET @SQLStr = ' AND StatusID= '...
January 22, 2008 at 12:00 pm
This is the entire code:
USE [TSDataWarehouse]
GO
/****** Object: StoredProcedure [consultantreports].[uspS_DownlineCoaching] Script Date: 01/17/2008 09:09:11 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
/*-------------------------------------------------------------------------------------------------
STORED PROC: [consultantreports].[uspS_DownlineCoaching]
DESCRIPTION:returns the downline coaching...
January 22, 2008 at 10:56 am
@And is being assigned above the filter block;
IF (@GreaterThan IS NOT NULL) AND (@LessThan IS NULL)
SELECT @And = ' AND MonthToDate_Total >= ' + CONVERT(VARCHAR(20),@GreaterThan) + ' '
ELSE IF...
January 22, 2008 at 10:15 am
This is being done within a Data Flow task, so I am not sure what you are asking.
January 21, 2008 at 8:10 am
Viewing 15 posts - 196 through 210 (of 258 total)