Forum Replies Created

Viewing 15 posts - 1 through 15 (of 258 total)

  • RE: ISNULL question

    Thanks for all the information. I was leaning towards the '= ' and you confirmed what i thought.

  • RE: ISNULL question

    The first one was a faster by about two seconds.

  • RE: Date Breakdown

    Thanks that worked.

  • RE: Issue with AND clause

    I am sorry I figured it out. I found out the issue it was the parameters were giving me back exactly what I told them too. Sorry to have wasted...

  • RE: Help with Dynamic SQL

    Yes to all that. Here is the script in it's entirety:

    DECLARE @ConsultantID nVarChar(50)

    DECLARE @AchieveLevelStart int

    DECLARE @AchieveLevelEnd int

    DEclare @Level10 bit

    Declare @Level20 bit

    Declare @Level30 bit

    Declare @Level40 bit

    Declare @Level50 bit

    Declare @Level60 bit

    Declare @Level70 bit

    Declare @Level80 bit

    DECLARE @LineFilter Varchar(100)

    DECLARE @Status varchar(100)

    DECLARE @MTDGreaterThan Decimal

    DECLARE @MTDLessThan Decimal

    DECLARE @QTDGreaterThan Decimal

    DECLARE @QTDLessThan Decimal

    DECLARE @State Varchar(20)

    DECLARE @And NVARCHAR(1000)

    DECLARE @QTDAnd NVARCHAR(1000)

    ,@SQLStr NVARCHAR(4000)

    ,@SQLLevel NVARCHAR(4000)

    ,@PeriodDate DateTime

    ,@ORStr Nvarchar(50)

    ,@StateSQL nvarchar(50)

    SET...

  • RE: Help with Dynamic SQL

    Actually that last statement worked fine but in order to get it functional I need to add it into my WHERE Clause then I can just get rid of that...

  • RE: Help with Dynamic SQL

    The @Level paramters are passed into the proc by the user. they can display which levels they want the proc to return. Each @level is a bit field.

    I tried the...

  • RE: Help with Dynamic SQL

    Ok let eliminate the dynamic SQL. How would I introduce the @Level into the WHERE clause?

  • RE: Help with Dynamic SQL

    OK those statements look the same to me. But I was thinking I should be able to filter them out in my temp table before I even get to the...

  • RE: Help with Dynamic SQL

    I guess the next question is how do I fix it. How would I tell it that I need to omit the 0=1 levels.

  • RE: Help with Dynamic SQL

    I know the logic is sound but the issue is that in the case of the following result String:

    SELECT * FROM #DLFiltered WHERE Active = 1 AND DownlineLevel...

  • RE: Help with Dynamic SQL

    The problem now is the point of the 1=1 and 0=1 is that I do not want to display the level that have 0=1 but right now it is still...

  • RE: Convert Date to Julian Date

    That link was really helpful. Thanks.

  • RE: Recursive Query in a view

    Seems straight forward but how would I handle the parameters that the Recursive query uses?

  • RE: Help with Dynamic SQL

    The 1=0 works great. Thanks

Viewing 15 posts - 1 through 15 (of 258 total)