MSSQL 2005 Drop / Create [Answered]
-
If I drop / create a table in MSSQL 2005 will all of the dependent views still work?
Thanx, >>>-----> MikeO
-
If I drop / create a table in MSSQL 2005 will all of the dependent views still work?
Thanx, >>>-----> MikeO
if i get your question right If you drop a table that is used in a view will it still work? the answer is no you will get binding error if you then recreate said table? then yes the view will work. hope that answers your question
Marc Clifton wrote:
That has nothing to do with VB. - Oh crap. I just defended VB!
-
if i get your question right If you drop a table that is used in a view will it still work? the answer is no you will get binding error if you then recreate said table? then yes the view will work. hope that answers your question
Marc Clifton wrote:
That has nothing to do with VB. - Oh crap. I just defended VB!
The question is will I have to drop and create each view again?
Thanx, >>>-----> MikeO
-
The question is will I have to drop and create each view again?
Thanx, >>>-----> MikeO
i create a test script to try out your question and i didn't have to recreate the view. but you will have take into account indexes etc.
Marc Clifton wrote:
That has nothing to do with VB. - Oh crap. I just defended VB!
-
i create a test script to try out your question and i didn't have to recreate the view. but you will have take into account indexes etc.
Marc Clifton wrote:
That has nothing to do with VB. - Oh crap. I just defended VB!
I have created scripts for the indexes and triggers. The list of dependents is quite long though, so I don't want to create too much of a mess. Thank you for running the test. I should have thought of that.
Thanx, >>>-----> MikeO
-
If I drop / create a table in MSSQL 2005 will all of the dependent views still work?
Thanx, >>>-----> MikeO
Do you just want to get rid of all records in that table? Then try a
TRUNCATE TABLE
query. -
Do you just want to get rid of all records in that table? Then try a
TRUNCATE TABLE
query.What I am trying to do is find out why a query that used to take 10ms is now taking 3 seconds to return a record set. I was hoping that dropping and then creating the table again might fix whatever had changed. There are only about 7000 records in the table most of the time, so a query should not take that long. I have followed up on this thread with a new question: A-tale-of-two-queries[^] If you have any insight on 'Audit Login' I would appreciate hearing about it.
Thanx, >>>-----> MikeO