home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,294 of 19,505   
   Wishmaster to All   
   strange behavior with SP   
   05 May 11 11:54:28   
   
   From: "sysadmin.rock[SINESTO]"@gmail.com   
      
   Hi everyone,   
      
   I got this situation, I got a stored procedure that for some reason   
   after using it for some period of time (maybe a day or two)  stops   
   sending results, but  if I change the position of the condition (where)   
   on the first line then begins to work ok.  This solution works a day or   
   two but the issue arise again and I must change the line to it's   
   original version, completing this weird cycle.  have you ever seen this   
   kind of behavior before?   
   The first commented line is what i need to change time to time...   
   			   
      
   	--Where (Cr.ID_Credito = @ID_Credito Or @ID_Credito = 0)   
   	Where (@ID_Credito = 0 Or Cr.ID_Credito = @ID_Credito)   
   	And		(Co.Rut_Cliente = @Rut_Cliente Or @Rut_Cliente = '')   
   	And		(Cr.Estado_Credito = @Estado_Credito Or @Estado_Credito = '')   
   	And		(Cr.Confirmado= @Confirmado or @Confirmado='')   
   	And 	(Cr.Estado_Credito in   
   ('CP','AN','CE','CA','EO','AC','CO','CR','CD','JU'))   
   	And	(Cr.Rut_Empresa = @Rut_Empresa Or @Rut_Empresa = '')   
   	and (Co.Codigo_Local=@Codigo_Local or @Codigo_Local=0)   
   	and	(Cr.Automotora=@Rut_Automotora or @Rut_Automotora='')   
   	and (PE.Rut_persona=@Rut_Persona or @Rut_Persona='')   
   	and	(Cr.Confirmado = @Confirmado or @Confirmado='')   
   	and	(Cr.Garantizado = @Garantizado or @Garantizado='')	   
   	   
      
   Thanks.   
   Diego.   
      
   ASP, Com+   
   SQL Server 2005 SP3   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca