January 13, 2011 at 8:46 am
Jan Van der Eecken (1/13/2011)
Ray K (1/13/2011)
Thank you, fellow Threadizens, for coming to my rescue -- and I'm not just talking about getting my simple question answered.I've been Celkoed again.
In Celko's defense, I actually learned something from it for a change. I had never seen the "MERGE INTO" construct :w00t:
Indeed. This is the first time I see a MERGE statement for a self-join UPDATE.
Interesting stuff.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
January 13, 2011 at 9:25 am
Roy Ernest (1/13/2011)
This place rocks... I ask for help and I get tons of help. This is the second time I asked for help here and both the times I was pointed to the right direction. 🙂I have been noticing that the twitter #sqlhelp tag is over rated. SSC rocks... !!!!!
Ayup.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 13, 2011 at 10:09 am
Any of the Threadizens interested in a performance tuning project in the Los Angeles area? Drop me a PM.
January 13, 2011 at 10:42 am
Koen (da-zero) (1/13/2011)
Jan Van der Eecken (1/13/2011)
Ray K (1/13/2011)
Thank you, fellow Threadizens, for coming to my rescue -- and I'm not just talking about getting my simple question answered.I've been Celkoed again.
In Celko's defense, I actually learned something from it for a change. I had never seen the "MERGE INTO" construct :w00t:
Indeed. This is the first time I see a MERGE statement for a self-join UPDATE.
Interesting stuff.
Sheesh! I never expected my very simple question to generate so much discussion. I figured that Lowell answered my question, and that was the end of it!
Go figure.
+--------------------------------------------------------------------------------------+
Check out my blog at https://pianorayk.wordpress.com/
January 13, 2011 at 10:53 am
Stefan Krzywicki (1/13/2011)
They're trash money at this point. If people see money on the ground, they stop and pick it up. If they see a penny on the ground, they leave it there. No-one wants them.
You forgot pitching pennies. Taught my kids to do that recently to kill time. A couple of pennies are still useful.
January 13, 2011 at 11:54 am
Jan Van der Eecken (1/13/2011)
Ray K (1/13/2011)
Ray K (1/12/2011)
Hey Threadizens -- I could use some advice on what I hope is a quick and easy question!Thank you, fellow Threadizens, for coming to my rescue -- and I'm not just talking about getting my simple question answered.
I've been Celkoed again.
In Celko's defense, I actually learned something from it for a change. I had never seen the "MERGE INTO" construct :w00t:
I haven't used MERGE yet, though I likely should be for some of the processes I need to perform. I looked it up and BOL specifies INTO in the listing of Syntax at the top, but doesn't explain it in the definitions section. I was curious, so I put together a sample query as
MERGE ... USING
and tried it. It worked as it was supposed to. I then changed it to
MERGE INTO ... USING
and tried it. I didn't see any difference. Is there one? Is the INTO just there to make it compatible with ANSI standards?
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
January 13, 2011 at 11:56 am
Steve Jones - SSC Editor (1/13/2011)
Stefan Krzywicki (1/13/2011)
They're trash money at this point. If people see money on the ground, they stop and pick it up. If they see a penny on the ground, they leave it there. No-one wants them.You forgot pitching pennies. Taught my kids to do that recently to kill time. A couple of pennies are still useful.
Sure, but you can nickels or dimes for that, no?
I'd like to see them chance all coins to hard plastic and convert the dollar to a coin, getting rid of the paper.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
January 13, 2011 at 12:00 pm
LutzM (1/13/2011)
Any of the Threadizens interested in a performance tuning project in the Los Angeles area? Drop me a PM.
You're in the LA area? I thought you were in Germany!
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
January 13, 2011 at 12:02 pm
Merge and Merge Into are the same in T-SQL. It's like Insert Into.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 13, 2011 at 12:06 pm
Stefan Krzywicki (1/13/2011)
Steve Jones - SSC Editor (1/13/2011)
Stefan Krzywicki (1/13/2011)
They're trash money at this point. If people see money on the ground, they stop and pick it up. If they see a penny on the ground, they leave it there. No-one wants them.You forgot pitching pennies. Taught my kids to do that recently to kill time. A couple of pennies are still useful.
Sure, but you can nickels or dimes for that, no?
I'd like to see them chance all coins to hard plastic and convert the dollar to a coin, getting rid of the paper.
The problem is it would break every single vending machine in the country. Yes, that's the actual primary objection to plastic coins. The Treasury did feasability studies, and vending machines, parking meters, coin-operated laundry machines, and so on, would cost more to re-engineer for plastic coins than it would save to convert over to them from metal. Forgery issues came up as well, because too many people would have to learn how to identify real from fake and it wouldn't be as easy.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
January 13, 2011 at 12:07 pm
GSquared (1/13/2011)
Merge and Merge Into are the same in T-SQL. It's like Insert Into.
Ah, awsome. I'd thought that might be the case based on my experiment and the lack of clarification on the MERGE page in BOL, but it is nice to have it confirmed. I wasn't sure if I was missing something. Thanks!
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
January 13, 2011 at 12:07 pm
WayneS (1/13/2011)
LutzM (1/13/2011)
Any of the Threadizens interested in a performance tuning project in the Los Angeles area? Drop me a PM.You're in the LA area? I thought you were in Germany!
LOL, that might be why he's giving the work away. 😉
I doubt they'd be interested in remote after-hours consulting work, so I'll have to skip. Thanks tho'. 🙂
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
January 13, 2011 at 12:08 pm
GSquared (1/13/2011)
The problem is it would break every single vending machine in the country. Yes, that's the actual primary objection to plastic coins. The Treasury did feasability studies, and vending machines, parking meters, coin-operated laundry machines, and so on, would cost more to re-engineer for plastic coins than it would save to convert over to them from metal. Forgery issues came up as well, because too many people would have to learn how to identify real from fake and it wouldn't be as easy.
That and no child's tiddlywink set would ever be safe again from daddy when he's feeling the pinch on the electric bills...
Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.
For better assistance in answering your questions[/url] | Forum Netiquette
For index/tuning help, follow these directions.[/url] |Tally Tables[/url]
Twitter: @AnyWayDBA
January 13, 2011 at 12:14 pm
GSquared (1/13/2011)
Stefan Krzywicki (1/13/2011)
Steve Jones - SSC Editor (1/13/2011)
Stefan Krzywicki (1/13/2011)
They're trash money at this point. If people see money on the ground, they stop and pick it up. If they see a penny on the ground, they leave it there. No-one wants them.You forgot pitching pennies. Taught my kids to do that recently to kill time. A couple of pennies are still useful.
Sure, but you can nickels or dimes for that, no?
I'd like to see them chance all coins to hard plastic and convert the dollar to a coin, getting rid of the paper.
The problem is it would break every single vending machine in the country. Yes, that's the actual primary objection to plastic coins. The Treasury did feasability studies, and vending machines, parking meters, coin-operated laundry machines, and so on, would cost more to re-engineer for plastic coins than it would save to convert over to them from metal. Forgery issues came up as well, because too many people would have to learn how to identify real from fake and it wouldn't be as easy.
They could make them appear just like the current coins for forgery problems, maybe even using some of the techniques they use for bills or inserting an rfid chip. As for the vending machine/laundry machine problem, many are going more and more to stored value cards (laundromats anyway) or we could follow Europe and Japan and let people operate vending machines with their phones.
And over the long haul money would be saved, even if you convert every existing machine, especially if you include converting the dollar to a coin. You don't happen to have a link to the feasability study, do you? I'd love to read it.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
January 13, 2011 at 12:15 pm
Craig Farrell (1/13/2011)
GSquared (1/13/2011)
The problem is it would break every single vending machine in the country. Yes, that's the actual primary objection to plastic coins. The Treasury did feasability studies, and vending machines, parking meters, coin-operated laundry machines, and so on, would cost more to re-engineer for plastic coins than it would save to convert over to them from metal. Forgery issues came up as well, because too many people would have to learn how to identify real from fake and it wouldn't be as easy.That and no child's tiddlywink set would ever be safe again from daddy when he's feeling the pinch on the electric bills...
I wonder how many kids these days actually have tiddlywink sets.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
It’s unpleasantly like being drunk.
What’s so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
Viewing 15 posts - 23,161 through 23,175 (of 66,749 total)
You must be logged in to reply to this topic. Login to reply