• JoNTSQLSrv (6/25/2016)


    J Livingston SQL (6/25/2016)


    I am sorry...but I cannot tell you if its correct......you have to tell us.

    your sample dataset is small ...perhaps if you expand this for more than one sellerid and also include what effect the column "tolerance" has...then I ma sure you will get an answer.

    Please expnad your dataset and provide your expected results.

    Any how even i am confused with tolerance J Livingston SQL GURU, so we will leave that tolerance GURU, let take only total credit.

    Actually , i need to incorparate some more logic like if Agent is single then for him different title if Agent company then different title.

    so lastly , i kindly request you to convert that cte query that you gave to while loop query, which uses table variable , goto statement, break continue statments. I mean to say using while loop approach by taking agent total credit and comparing one by one in credit_master table and then assigning title , so if i get this structure then i can include some of the logic's in it ...

    kind of same result in while loop instead cte

    sorry if i am wrongly requesting

    so..I'll ask again

    Actually , i need to incorparate some more logic like if Agent is single then for him different title if Agent company then different title.

    If you dont provide all the necessary rules...how can you expect us to help you?

    Please expand your dataset and provide your expected results.

    also.....please explain while you are insisting on using a "while loop".?

    why do you think is necessary?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day