September 7, 2011 at 4:45 pm
Comments posted to this topic are about the item Merge statement
September 7, 2011 at 4:56 pm
Good easy question.
Of course it may be that the query processing could order the merge conditions in order of specificity. We did that with the pattern matching conditions of Hope+, maybe Haskell inherited that too so it's not obviously out of the question - but I haven't examined the semantics of merge conditions to determine whether there is guaranteed always to be a data-independent specificity-based total order on them, and I can't assert it is possible when I haven't done that analysis. If it is possible and straighforward then doing it would make it possible for people to write much more confusing Merge statements, which doesn't sound like a good thing, but it would also make it possible to tack more specific conditions on at the end and there is a good argument that writing conditions in increasing specificity order (instead of in the reverse order, as required by the SQL Merge statement) improves code readability. So what do people think - woul dthat be a good change to SQL or a bad one?
Tom
September 7, 2011 at 7:56 pm
September 7, 2011 at 9:51 pm
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
September 7, 2011 at 10:17 pm
SQLRNNR (9/7/2011)
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D
[? ? ?
September 7, 2011 at 10:32 pm
bitbucket-25253 (9/7/2011)
SQLRNNR (9/7/2011)
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D[? ? ?
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
September 7, 2011 at 11:02 pm
an easy question but informative!
September 8, 2011 at 12:32 am
This was removed by the editor as SPAM
September 8, 2011 at 3:27 am
SQLRNNR (9/7/2011)
Nice question. Thanks to DBCC Timewarp we were able to answer the Oct 14 question over a month early. :-D:-D:-D:-D
I'was just getting used to seeing Monday questions on the preceding Saturday, nice small 2 day warp which does no harm, but anti-slips of more than a month will take some getting used to.
There's an even bigger time anti-slip on this article[/url] and yet bigger again on its successor[/url]; I commented on the fomer before I noticed the time discrepancy (several others had commented too) but I noticed the timeslip on its successor when I oicked its discussion up frm "recent posts" and refrained from commenting because with nearly three months to go it could be an early draft. The three preceding articles in that "stairway" also had first posts for their discussions ranging from 1 month to two months before the publication dates. SO articles, discussions, and QoTDs all getting warped backwards in time. How much antimatter is Steve wasting to generate these unintentional (??) warps?
Of course these are still small anti-slips, nowhere near big enough to be useful to the project managers of large UK govt IT projects. :w00t:
Tom
September 8, 2011 at 6:07 am
good question!!!
why is it possible to answer this question? if it should be displayed on Oct. 14!
September 8, 2011 at 6:18 am
there is no prerequiste is defined for this question.
such as procedure must be already created, UnitMeasure table to be created with production user etc.
Because of this, this has to treated as invalid question.
Always Think Positive
September 9, 2011 at 7:50 am
Nice question. I learned something new about MERGE.
I also learned that sometimes the internet likes to play tircks with time.
September 9, 2011 at 7:52 am
srikanthms (9/8/2011)
there is no prerequiste is defined for this question.such as procedure must be already created, UnitMeasure table to be created with production user etc.
Because of this, this has to treated as invalid question.
The question is about the errors in the merge statement.
Most people know to change an Alter Procedure to a Create Procedure statement if the sproc does not exist in thier environment.
September 9, 2011 at 8:23 am
srikanthms (9/8/2011)
there is no prerequiste is defined for this question.such as procedure must be already created, UnitMeasure table to be created with production user etc.
Because of this, this has to treated as invalid question.
If you simply want to run the script - everything you need to make the UnitMeasure Table is available in the script (at least the pertinent parts required for the proc). As for the "alter procedure" just change that to a create and you can create the proc.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
September 9, 2011 at 9:10 am
Sometimes the questions are built on such 'mistakes' like this ALTER/CREATE PROCEDURE. Now it's a 'you should know that it's only meaningless failure'.
How can we decide which option to use?
Actually the question was: what will the above code output: no right choice, alter procedure fails instantly.
Viewing 15 posts - 1 through 15 (of 25 total)
You must be logged in to reply to this topic. Login to reply