troubleshooting Question

Need help in debugging a UDF results

Avatar of bfuchs
bfuchsFlag for United States of America asked on
DatabasesMicrosoft SQL ServerMicrosoft SQL Server 2005MongoDB* T-SQL
7 Comments3 Solutions199 ViewsLast Modified:
Hi Experts,

I have a function that accepts some parameters and returns a results string.
See attached.

Now I need some help figuring out why the section below only works when the results (@MissingDocs)  includes "Missing: License" as part of the wording, otherwise I dont see it working..

if @BclsExpires between getdate() and getdate()+ 60
	begin
		select @WillExpire = @WillExpire + ', Bcls'
		select @IsBclsDate = 1
	end
if @AclsExpires between getdate() and getdate()+ 60
	begin
		select @WillExpire = @WillExpire + ', Acls'
		select @IsAclsDate = 1
	end
if @NalsExpires between getdate() and getdate()+ 60
	begin
		select @WillExpire = @WillExpire + ', Nals'
		select @IsNalsDate = 1
	end
if @PalsExpires between getdate() and getdate()+ 60
	begin
		select @WillExpire = @WillExpire + ', Pals'
		select @IsPalsDate = 1
	end	
Basically I'm looking for some hints on how to debug this, as I'm using SQL 2005 where I cannot use debuggers tools..
MyFunc.txt
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 3 Answers and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 3 Answers and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros