Good day, I was wondering if anyone can point out what I am doing wrong. When I run the sql in sql studio I get the restults back correctly. However, when I run in live reports it apepars it gives me the whole table.
DECLARE @tmp_ObjID int DECLARE @tmp_type varchar(15) DECLARE @tmp_Name Varchar(100) DECLARE @tmp_FullPath VARCHAR(1000) set @tmp_ObjID = 1309540 set @tmp_Type = 'Delete' set @tmp_Name = (select Name from DTree where DataID=@tmp_ObjID) set @tmp_FullPath = (select dbo.PVTB_GetFullPath(dataid)Path from DTree where DataID=@tmp_ObjID) set @tmp_FullPath = '' + @tmp_FullPath + ':' +@tmp_Name + '%'+ ''; select da.AuditStr 'type' ,da.Value2 'DocName' ,da.Value1 'OriginalLocation' ,da.AuditDate 'DateDeleted' ,kf.Name from DAuditNew da ,KUAF kf where 1=1 and da.PerformerID = kf.ID and da.Value1 like @tmp_FullPath and da.AuditStr = @tmp_Type --and da.AuditDate = SYSDATETIME() ORDER BY DateDeleted DESC