Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Wanderer
Master Smack Fu Yak Hacker
1168 Posts |
Posted - 2005-06-24 : 04:25:33
|
Does anyone know why stored procedure's and views need to be quote: 'CREATE VIEW' must be the first statement in a query batch.
And yet tables, indexes, constraints and many other system objects can be created one after the other...I just can't figure it outOh well*##* *##* *##* *##* Chaos, Disorder and Panic ... my work is done here! |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-06-24 : 05:43:19
|
| That is the StandardWhat forces you to ask this question?MadhivananFailing to plan is Planning to fail |
 |
|
|
Wanderer
Master Smack Fu Yak Hacker
1168 Posts |
Posted - 2005-06-24 : 08:37:45
|
Nothing forces me .. I was just interested if there was a technical reason behind why SQL Server does this.Several of our rollout scripts have changes in them, and our "template" does reporting on environment where the script is run, start time and end time, and run time etc. Run time is generated by subtracting start time, which was stored in a variable, from end time. I know that when run from QA, you can see the run time, but the idea is that these reports are saved, and with their displays the details what was done, where, and how long it took, for example:Start point of script: Create PartyProductAudit table to cater for Link and Delink history rows -------------------------------------------------- Run on SQL Server : OPSWS148 ------------- ------------------------------------------------------ Run on date : 2005-06-24 14:33:08.703Start of Script : 2005-06-24 14:33:08.703Create Reference TableTable : AuditActionType does not exist - it will be createdTable : AuditActionType has been createdCreate Instance TableTable : PartyProductAudit does not exist - it will be createdTable : PartyProductAudit has been createdEnd of Script. Runtime was : 1 seconds Obviously, batch terminator means I lose my Start time, hence cannot create run times.This is NOT a critical issue - we will run the creation of the VIEWS etc. without the Run Time of the template, but it raised the question in my mind as to why it was being done.*##* *##* *##* *##* Chaos, Disorder and Panic ... my work is done here! |
 |
|
|
|
|
|
|
|