In this case something wrong in your logic. Run following select to see Id ranges for each usertype.
SELECT OutbackLogin.OLUserType, MIN(OGC.OGCID), MAX(OGC.OGCID)
from OGC inner join OutbackLogin ON OGC.OGCID = OutbackLogin.OLUserID
GROUP BY 1
SELECT @UserType= OLUserType FROM OutbackLogin WHERE (OLUserName = @LoginName)
> If @UserType='TM'
> /* Grab all of the Territory Managers' OGC's */
> select distinct * from OGC inner join
> OutbackLogin ON OGC.TERRMGRID = OutbackLogin.OLUserID
> WHERE (OutbackLogin.OLUserName = @LoginName)
> order by businessname,lastname,firstname
> Else If @UserType='OGC'
> /* Grab the single OGC information - This should work the same as the Load method of the DB object */
> select distinct * from OGC inner join
> OutbackLogin ON OGC.OGCID = OutbackLogin.OLUserID
> WHERE (OutbackLogin.OLUserName = @LoginName)
> order by businessname,lastname,firstname
>Yes, I did not receive any results for those usertypes.
>
>>>Logically that should work, but I tried it and it still does not work.
>>
>>Hi Matt,
>>
>>Could you quote my replies otherwise it's hard to follow discussion.
>>
>>Are you saying that you didn't get any CSR or ADMIN in the select result?
--sb--