December 14, 2010 at 9:22 am
LutzM (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πBut I hope you'll allow Jeff to let the iPad go before....
Sure. I don't want to see anyone or any animal hurt in the process.
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
December 14, 2010 at 9:38 am
Alvin Ramard (12/14/2010)
LutzM (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πBut I hope you'll allow Jeff to let the iPad go before....
Sure. I don't want to see anyone or any animal hurt in the process.
If both, Jeff and the horse, are well trained, neither one would get hurt. π
That doesn'r count for the iPad, I'd guess...
December 14, 2010 at 9:39 am
GilaMonster (12/14/2010)
Thunderstorms here, but no snow storms. (I'd worry if there were)Want some entertainment? I give you Gus's reply here http://www.sqlservercentral.com/Forums/FindPost1034345.aspx, nominated for comment on the week.
It almost resulted in coffee over laptop.
You're welcome.
- 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
December 14, 2010 at 9:42 am
LutzM (12/14/2010)
That doesn'r count for the iPad, I'd guess...
That's the whole point. π
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
December 14, 2010 at 9:46 am
Stefan Krzywicki (12/14/2010)
GilaMonster (12/14/2010)
Thunderstorms here, but no snow storms. (I'd worry if there were)Want some entertainment? I give you Gus's reply here http://www.sqlservercentral.com/Forums/FindPost1034345.aspx, nominated for comment on the week.
It almost resulted in coffee over laptop.
I kind of want to start a contest to see who can write the most complex way to round up to 1000.
I'm in. General concept: loop through 1000 numbers (original value +i) trying to find the one where the digit representing the 1000 changed compared to the prev. run. Use string functions to find that digit π
December 14, 2010 at 9:50 am
Stefan Krzywicki (12/14/2010)
GilaMonster (12/14/2010)
Thunderstorms here, but no snow storms. (I'd worry if there were)Want some entertainment? I give you Gus's reply here http://www.sqlservercentral.com/Forums/FindPost1034345.aspx, nominated for comment on the week.
It almost resulted in coffee over laptop.
I kind of want to start a contest to see who can write the most complex way to round up to 1000.
I don't know about "most complex", but I think I can hit "worst set-based solution".
My next suggestion was going to be a table of all of the numbers evenly divisible by 1,000, and a join to a table of all the numbers currently in the table that you want to round up from, with an FK to the valid number.
create table dbo.ValidNumbers (
ID uniqueidentifier primary key default(newid()),
ValidNumber int not null unique,
constraint CK_Valid check (ValidNumber%1000 = 0));
go
create table dbo.PossibleNumbers (
ID uniqueidentifier primary key default(newid()),
ValidNumberID uniqueidentifier not null references dbo.ValidNumbers(ID),
InvalidNumber int not null unique);
Then add a trigger to the table you want to query, so that if a new value is added, not already in the PossibleNumbers table, it gets put into it with the correct ValidNumber reference. If there is no ValidNumber for it, then the trigger needs to insert into the ValidNumbers table first.
Then, when you want to round up in a query, you can just join to these two tables and viola! As a bonus, just the use of that stupid a surrogate key would probably put Celko into a coma.
(I think Occam just exploded from all the centrifical force.)
- 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
December 14, 2010 at 9:54 am
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. π
How about a horse stepping on an iMat?
- 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
December 14, 2010 at 9:57 am
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πHow about a horse stepping on an iMat?
iMat? You'll need DBCC TimeWarp for that one. π
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
December 14, 2010 at 9:58 am
Alvin Ramard (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πHow about a horse stepping on an iMat?
...
iMat? You'll need DBCC TimeWarp for that one. π
Not for a picture of it!
- 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
December 14, 2010 at 10:14 am
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πHow about a horse stepping on an iMat?
...
iMat? You'll need DBCC TimeWarp for that one. π
Not for a picture of it!
Where's the iBed?
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
December 14, 2010 at 10:17 am
CirquedeSQLeil (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πHow about a horse stepping on an iMat?
...
iMat? You'll need DBCC TimeWarp for that one. π
Not for a picture of it!
Where's the iBed?
What good is a device that just keeps telling you "See Above"?
--------------------------------------
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
December 14, 2010 at 10:17 am
CirquedeSQLeil (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πHow about a horse stepping on an iMat?
...
iMat? You'll need DBCC TimeWarp for that one. π
Not for a picture of it!
Where's the iBed?
The iEgo won't allow anything too risque in the app store. Do you really think they'll allow anything that would allow you to ... oh never mind ... this is a family-friendly forum, can't go where I was about to.
- 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
December 14, 2010 at 10:19 am
GSquared (12/14/2010)
CirquedeSQLeil (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
GSquared (12/14/2010)
Alvin Ramard (12/14/2010)
I'd prefer a picture of the horse stepping on the iPad. πHow about a horse stepping on an iMat?
...
iMat? You'll need DBCC TimeWarp for that one. π
Not for a picture of it!
Where's the iBed?
The iEgo won't allow anything too risque in the app store. Do you really think they'll allow anything that would allow you to ... oh never mind ... this is a family-friendly forum, can't go where I was about to.
What's so bad about going to bed? π
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
December 14, 2010 at 10:21 am
Stay out of the gutter Gus. It's crowded enough in here without you. π
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
December 14, 2010 at 10:23 am
CirquedeSQLeil (12/14/2010)
GSquared (12/14/2010)
CirquedeSQLeil (12/14/2010)
Where's the iBed?The iEgo won't allow anything too risque in the app store. Do you really think they'll allow anything that would allow you to ... oh never mind ... this is a family-friendly forum, can't go where I was about to.
What's so bad about going to bed? π
Haven't you heard? Sleeping on the job is a capital offense. You can be sued for posting about it on an open forum. @=)
Viewing 15 posts - 22,396 through 22,410 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply