[dba-SQLServer] dba-SQLServer Digest, Vol 45, Issue 26

David Lewis DavidL at sierranevada.com
Thu Nov 30 14:44:44 CST 2006


I had something very similar, if not identical, happen to me a few weeks
ago.  In the end I ended QA and shut down the computer, then restarted
everything and it then worked.  I could come up with no reasonable
explanation.  I haven't come across anything like that ever before.  Go
Figure.  D. Lewis

 

 

 

Message: 6

Date: Thu, 30 Nov 2006 19:45:39 +0000

From: "Mark A Matte" <markamatte at hotmail.com>

Subject: Re: [dba-SQLServer] SQL in SP failing

To: dba-sqlserver at databaseadvisors.com

Message-ID: <BAY127-F3724234469D4856F196A05D2DB0 at phx.gbl>

Content-Type: text/plain; format=flowed

 

The real mystery is that it ran the first few times after I created it.


When it started failing I would change things, save, run, fail,change
things 

back,save, and it would run correctly.

 

Like just now...I got it to run...here is the actual sql:

 

set @sql='insert into tblBrita_ID(case_id,Criteria) SELECT case_id, 

"'+ at ID+'" As Criteria FROM tblCase where creation_date > "1/1/2006" and'
+ 

@ID

 

And this was what I started with that would NOT run...and what I
finished 

with that did run(SAME CODE).  To clarify...The @ID is actually criteria


used to isolate records.  I need to know what criteria picked a 

record...that is why I save it in the new table.

 

I got it to run...but am very confused as to why it does...sometimes?

 

Any and all feedback is appreciated.

 

Thanks,

 

Mark A. Matte

 




More information about the dba-SQLServer mailing list