RE: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread GLM
Thx Mike, I've started my reading early. One of my questions was: how much space would the numbers table occupy? Found that that 2G rows (2,000,000,000) is roughly 8GB in size. http://code.msdn.microsoft.com/SQLExamples/Wiki/View.aspx?title=NumbersTable I'll need at the most 365 x 3000 years i

Re: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread James Holmes
How about dynamically generating a set of UNIONed queries (one for each of the years in the range)? -- WSS4CF - WS-Security framework for CF http://wss4cf.riaforge.org/ On 27 September 2010 07:58, Mike Chabot wrote: > > If someone is in office with a range of 2004 - 2006, the year 2005 > does

Re: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread Mike Chabot
I was thinking years, but you could do days as well. It depends on what you want to group on in the output. To save you some searching, below is SQL to fill a numbers table for SQL Server, if you go that route. As I said earlier, the other methods work fine also. I tend to prefer doing as much as

Re: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread Mike Chabot
If someone is in office with a range of 2004 - 2006, the year 2005 does not appear in the SQL results, yet 2005 needs to be grouped on. You can't group on a value that doesn't exist. There is no year column in the output to group on, only a start date and an end date. -Mike Chabot On Sun, Sep 26

Re: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread Russ Michaels
Mike, why do you would you need to know the exact years to use grouped output? This is not how it works. Grouped output simply groups the output by the defined column So if you group ny year, it will output all records with the same year together allowing you to then separate the output, add head

RE: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread GLM
Maybe I don't have a clear concept of a numbers table (I'll be reading up on them tomorrow.) but wouldn't I need a "number" to correspond to the units in question (in this case days.) thx -Original Message- From: Mike Chabot [mailto:mcha...@gmail.com] Sent: Sunday, September 26, 2010 11

RE: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread GLM
I didn't see it working as I only have the dateStart and dateEnd. I guess it's time I learn how a numbers table works. Thx -Original Message- From: Russ Michaels [mailto:r...@michaels.me.uk] Sent: Sunday, September 26, 2010 5:21 AM To: cf-talk Subject: Re: cfoutput or cfloop? which is

Re: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread Mike Chabot
If you go with the numbers table route, I should clarify that this is a standard technique that is commonly used, so you should be able to find a lot of information by searching on "sql server numbers table." I use these all the time. I would think that your numbers table only needs to contain num

Re: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread Mike Chabot
The grouped output doesn't work because the exact years are not known in the query output. Only the date range is known. -Mike Chabot On Sun, Sep 26, 2010 at 5:20 AM, Russ Michaels wrote: > > did the grouped cfoutpout not work for you then ? > > On Sun, Sep 26, 2010 at 4:55 AM, GLM wrote: > >>

Re: Trying to set cfform focus in an Ajax window

2010-09-26 Thread Michael Grant
I thought about it a bit more and you're right, inline code should fire. So I did a test and I can get the following code to work and set focus after the ajax call. here's index.cfm Untitled $(document).ready(function(){ $.ajax({ url: "/testCode/getCode.cfm", context: document.body, succe

RE: Trying to set cfform focus in an Ajax window

2010-09-26 Thread Andrew Scott
That is actually a good point Michael, and the other thing to note which catches a lot of people out, is that the functions should be along the lines of myFunction = function() {} as noted by Adobe in their docs. But having said this, I am almost positive that inline JS outside of a function sho

Re: Trying to set cfform focus in an Ajax window

2010-09-26 Thread Michael Grant
Well you at least have your form and js set up right now. And after going back and re-reading your post I see this is ajax. IIRC in-line javascript in ajax content doesn't automatically fire. Most likely this is a security thing. So that gives you two options (at least). 1. Wrap your JS code at

Re: Working with a webservice. Help.

2010-09-26 Thread Michael Grant
Wow, fantastic answer. That gives me lots of leads moving forward. Thanks D-Dub. On Sat, Sep 25, 2010 at 11:11 PM, Dave Watts wrote: > > > Hmm. I guess I'll have to actually build the xml myself then. The reason > I > > need the xml is because I only really use cf as a proxy for hitting the > >

Re: cfoutput or cfloop? which is the more practical solution

2010-09-26 Thread Russ Michaels
did the grouped cfoutpout not work for you then ? On Sun, Sep 26, 2010 at 4:55 AM, GLM wrote: > > Mike thanks for the lead. It had crossed my mind to build a numbers table > but I didn't think it would work. (I've never used them myself.) > > I thought that it was somewhat excessive as there wo