The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
create function [dbo].[datefromparts]
@year int, @month int, @day int
declare @rtnDate date;
set @rtnDate = convert(date, ltrim(str(@year)) + '-' + case when @month < 10 then '0' + ltrim(str(@month)) else ltrim(str(@month)) end + '-' + case when @day < 10 then '0' + ltrim(str(@day)) else ltrim(str(@day)) end)
Strangely, the datefromparts built-in function comes up in the intellisense in SSMS 2008R2 but then of course fails.
Of course, I would never recommend using a scalar function like this anyway, but hey, I learned a new function today...doubt if I'll ever use it.
The point isn't that we can't come up with a workaround. The point is that whatever workaround we come up with hasn't gone through a formal testing cycle prior to the deployment.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible." - Mr.Prakash One Fine Saturday. 24/04/2004
However, these quantum bits, or qubits for short, do not display the special characteristics of Schrödinger's cat in contrast to the 20 qubits that the team of researchers have now created using a programmable quantum simulator
So they are claiming a new record based off a simulation????
Who is this Rorschach guy and why does he paint so many pictures of my parents fighting?
Two sociologists are sitting by the pool. One turns to the other and asks, "Have you read Marx?" to which he replies, "Yes, it's these silly wicker chairs."
Pavlov is sitting at a pub enjoying a pint. The phone rings and he jumps up shouting, "Oh s---, I forgot to feed the dog!"
A man walks up to a librarian and asks, "Do you have any books on Pavlov's dogs and Schrödinger's cat?" The librarian responds, "It rings a bell but I'm not sure if it's here or not."
There are two types of people in the world: Those who can extrapolate from incomplete data sets.
Einstein, Newton, and Pascal decide to play hide-and-seek. Einstein is "It," closes his eyes, counts to 10, and then opens them. Pascal is nowhere to be seen. Newton is sitting right in front of Einstein, with a piece of chalk in his hand. He's sitting in a box drawn on the ground, a meter to one side. Einstein says, "Newton, you're terrible, I've found you!" Newton says, "No no, no. You've found one Newton per square meter. You've found Pascal!"
A biologist, a chemist, and a statistician are out hunting. The biologist shoots at a deer and misses 5 meter to the left. The chemist takes a shot and misses 5 meter to the right. The statistician yells, "We got 'em!"
What do you get when you put root beer in a square glass? Answer: Beer
A photon checks into a hotel and the bellhop asks him if he has any luggage. The photon replies, "No, I'm travelling light."
Did you hear about the man who got cooled to absolute zero? He's 0K now.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors.
A classics professor goes to a tailor to get his pants mended. The tailor asks, "Euripides?" The professor replies, "Yes. Eumenides?"
If you know what a parse tree is, I've made it so you can use markup in your grammar to alter the tree you get back. Parse trees are usually ugly and bloated. This lets you streamline the tree you get back, collapsing nodes, doing substitutions, etc.
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.
Last Visit: 19-Nov-19 20:20 Last Update: 19-Nov-19 20:20