If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > General > Chit Chat > OK Corral

Closed Thread
 
LinkBack Thread Tools Search this Thread Display Modes
  #706 (permalink)  
Old 11-29-12, 11:24
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 12,327
My "WTF?" of the day:
Code:
cast('1.0' as decimal(10,2)) * cast(FSEOBPercent as decimal(10,2))
...cause if you're going to multiply a value by 1, you want to make sure you do it right.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
www.LobsterShot.blogspot.com
  #707 (permalink)  
Old 11-29-12, 11:30
MCrowley MCrowley is offline
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 5,232
That's why I never go back through my old code.
  #708 (permalink)  
Old 11-29-12, 12:44
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 12,327
Wait, this is YOUR code????
Damn you. All this time I'd been thinking that Pat was sneaking NZDFs into our application.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
www.LobsterShot.blogspot.com
  #709 (permalink)  
Old 11-29-12, 13:04
Thrasymachus Thrasymachus is offline
Annie's Dog Walker
 
Join Date: Nov 2004
Location: at the bottom of the bottle
Posts: 8,131
I have been looking at this pile of wrongheaded dislexic short sighted tripe for so long I forgot what databases are supposed to look like. I know what not to do however.
__________________
“If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.
  #710 (permalink)  
Old 11-29-12, 14:14
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 13,558
Quote:
Originally Posted by blindman View Post
Wait, this is YOUR code????
Damn you. All this time I'd been thinking that Pat was sneaking NZDFs into our application.
I simply MUST make note of this for future use!

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
  #711 (permalink)  
Old 11-29-12, 14:20
MCrowley MCrowley is offline
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 5,232
Pat would have done something like
Code:
log (exp(1)) * cast(FSEOBPercent as decimal(10,2))
  #712 (permalink)  
Old 11-29-12, 16:54
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 13,558
Quote:
Originally Posted by MCrowley View Post
Pat would have done something like
Code:
log (exp(1)) * cast(FSEOBPercent as decimal(10,2))
Nope, I wouldn't have done that... Try it and see if you can tell me why I wouldn't.

Here's a hint:
Code:
SELECT log(exp(1)) * Cast(1.2 as decimal(10,2))
,  Cast(1 AS DECIMAL(10, 2)) * Cast(1.2 as decimal(10,2))
-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
  #713 (permalink)  
Old 11-30-12, 10:46
MCrowley MCrowley is offline
Wage drone 24601
 
Join Date: Jan 2003
Location: Massachusetts
Posts: 5,232
Can't say as I have a lot of experience with NZDF solutions, and checking significant digits (or returned datatype) did not occur to me.
  #714 (permalink)  
Old 11-30-12, 12:53
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 13,558
Understood. A lot of that comes from working with SMEs on really complex computational models. Most of the things that catch my attention are meaningless to most people, but can have significant impact in complex calculations and/or edge cases.

-PatP
__________________
In theory, theory and practice are identical. In practice, theory and practice are unrelated.
  #715 (permalink)  
Old 12-03-12, 09:56
Thrasymachus Thrasymachus is offline
Annie's Dog Walker
 
Join Date: Nov 2004
Location: at the bottom of the bottle
Posts: 8,131
Ugh. You can not buy paper US savings bonds anymore? I thought I had xmas for thie nieces and nephew all wrapped up. Stupid internet.
__________________
“If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.
  #716 (permalink)  
Old 12-04-12, 17:14
papadi papadi is offline
Registered User
 
Join Date: Oct 2009
Location: 221B Baker St.
Posts: 483
Quote:
You can not buy paper US savings bonds anymore?
From the Treasury site:
As of January 1, 2012, paper savings bonds are no longer sold at financial
institutions.

Can't get them via payroll deduction either.

How about Amazon gift "cards"?

Last edited by papadi; 12-06-12 at 21:48.
  #717 (permalink)  
Old 12-05-12, 22:05
corncrowe corncrowe is offline
Registered User
 
Join Date: Aug 2004
Location: Dallas, Texas
Posts: 565
Define paper?
  #718 (permalink)  
Old 12-06-12, 11:03
blindman blindman is offline
World Class Flame Warrior
 
Join Date: Jun 2003
Location: Ohio
Posts: 12,327
That stuff that software manuals used to be printed on.
The small yellow squares currently stuck to the rim of your computer monitor.
Something that can be shredded.
__________________
If it's not practically useful, then it's practically useless.

blindman
www.chess.com: "sqlblindman"
www.LobsterShot.blogspot.com
  #719 (permalink)  
Old 12-07-12, 13:38
Thrasymachus Thrasymachus is offline
Annie's Dog Walker
 
Join Date: Nov 2004
Location: at the bottom of the bottle
Posts: 8,131
Well this is another example of the internet making things worse. So I am not really talking to my sisters right now, so I was going to be passive aggressive about xmas presents for their kids and just throw some savings bonds in some cards and be done with it. This is something that people used to do. Easy.

Now you need a Treasury.gov account and the recipient needs one and if it is a minor it needs to be linked to their parent account. Ahhhh forget it. too much hassle.
__________________
“If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.
  #720 (permalink)  
Old 12-07-12, 14:06
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 20,000
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On