March 22, 2014 at 7:51 am
Hi,
Currently there is a view in PRODUCTION. When I do a SP_HELPTEXT VIEW1 , it gives me the VIEW CODE.
Now , when I CREATE another view , by changing the view, it fails. , which means to say that the VIEW CODE in the current view is also wrong. Is the View's OLD statement Cached in SQL Server 2008 in some table. Can I get the view statement from that table.
CREATE VIEW1
AS
SELECT NUMBER FROM TABLEA
Now, I get an error saying NUMBER Column does not exist in TABLEA
But the same VIEW1 , when executed , gives results (SELECT * FROM VIEW1) . Where is the old view code stored.
March 22, 2014 at 8:11 am
Nope, no caches of old object definitions.
Not following what's happening, so can't tell you what's wrong.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
March 22, 2014 at 9:25 am
Do you use fully qualified names? i.e. SELECT cols FROM dbo.Table1 instead of SELECT cols FROM Table1?
___________________________
Do Not Optimize for Exceptions!
March 22, 2014 at 10:51 pm
Could you provide the output of sp_help 'view', might shed some light on the problem.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply