Check out this... code....

2010-08-31 Thread Rick Root
Three fun pieces of code I found today while doing some maintenance on code I did not write: #1 - here's what happens when you use varchar fields for numeric data! SELECT SUM(CAST(FLOOR(CAST(OI.ItemQuantity AS float)) AS int) * round(CAST(OI.ItemPrice AS float),2) * ((100-CAST(OI.ItemDiscount

Re: Check out this... code....

2010-08-31 Thread Bryan Stevenson
Just goes to showpeople will make things work no matter how convoluted the code may become ;-) Bryan Stevenson B.Comm. VP Director of E-Commerce Development Electric Edge Systems Group Inc. phone: 250.480.0642 fax: 250.480.1264 cell: 250.920.8830 e-mail: br...@electricedgesystems.com web:

Re: Check out this... code....

2010-08-31 Thread Eric Cobb
I'm glad you posted this today, I just found this one a few minutes ago: #Year(DateAdd(, 1, Now()))-1# Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com http://www.cfgears.com Rick Root wrote: Three fun pieces of code I found today while doing some maintenance on code

RE: Check out this... code....

2010-08-31 Thread Andy Matthews
You're right. The correct version should be: #Year(DateAdd(, 0, Now()))# No need for the -1. andy -Original Message- From: Eric Cobb [mailto:cft...@ecartech.com] Sent: Tuesday, August 31, 2010 4:13 PM To: cf-talk Subject: Re: Check out this... code I'm glad you posted

RE: Check out this... code....

2010-08-31 Thread Rick Eidson
Must be going through some of my old code... :) I find some shtuff in my own code all the time. Rick -Original Message- From: Andy Matthews [mailto:li...@commadelimited.com] Sent: Tuesday, August 31, 2010 4:25 PM To: cf-talk Subject: RE: Check out this... code You're right

Re: Check out this... code....

2010-08-31 Thread Eric Cobb
...@ecartech.com] Sent: Tuesday, August 31, 2010 4:13 PM To: cf-talk Subject: Re: Check out this... code I'm glad you posted this today, I just found this one a few minutes ago: #Year(DateAdd(, 1, Now()))-1# Thanks, Eric Cobb ECAR Technologies, LLC http://www.ecartech.com

XML Problem Check out the code

2002-07-26 Thread BT THornton
I have a XML array that I appended and it says it was successful but no data is in the XML struct. Any ideas? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN HTML HEAD TITLEXML TEST/TITLE META http-equiv=Content-Type content=text/html; charset=iso-8859-1 /HEAD BODY cfset myXML1 =

Re: XML Problem Check out the code

2002-07-26 Thread todd
Yup, I would first remove all HTML tags when you're messing with CFMXL or XMLNEW() ~Todd On Fri, 26 Jul 2002, BT THornton wrote: I have a XML array that I appended and it says it was successful but no data is in the XML struct. Any ideas? !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01