Ben Nadel
On User Experience (UX) Design, JavaScript, ColdFusion, Node.js, Life, and Love.
I am the chief technical officer at InVision App, Inc - a prototyping and collaboration platform for designers, built by designers. I also rock out in JavaScript and ColdFusion 24x7.
Meanwhile on Twitter
Loading latest tweet...
Ben Nadel at CFUNITED 2010 (Landsdown, VA) with: Brian Swartzfager and Simon Free and Jason Dean and Jim Priest and Vicky Ryder

davidcl

Member since Dec 11, 2008

Recent Blog Comments By davidcl

  • Getting @@RowCount After SQL INSERT INTO Statement

    Posted on Jul 27, 2009 at 10:23 AM

    <CFQUERY....> declare @myvar int //do calculations on @myvar SELECT @myvar as result </CFQUERY> <cfoutput>#queryname.result#</cfoutput> That should work.... read more »

  • Translate Microsoft SQL (MSSQL) To MySQL

    Posted on Apr 21, 2008 at 9:58 AM

    @Will, even a factor of 4 would be enough for me to recommend against MAXROWS. But I've rewritten code where the change from MAXROWS to TOP resulted in an improvement of a factor of 100. One factor is how many rows are in the query. Another factor is how the query optimizer handles any joins ... read more »

  • Translate Microsoft SQL (MSSQL) To MySQL

    Posted on Apr 19, 2008 at 12:20 PM

    @Will, I strongly disagree. TOP and LIMIT place the limit on the sets returned by the database server. MAXROWS simply limits how much of the result Cold Fusion processes. If the unlimited query returns lots of rows, this can be a HUGE performance difference.... read more »

  • Translate Microsoft SQL (MSSQL) To MySQL

    Posted on Apr 17, 2008 at 12:45 PM

    Yep. I did some more searching on this and it doesn't look like there's an equivalent to @table variables in MySQL. The best recommendations I've found are: Create temporary tables using the "memory" storage engine, to provide the speed advantages of memory storage. Use the "create temporary tab... read more »

  • Translate Microsoft SQL (MSSQL) To MySQL

    Posted on Apr 16, 2008 at 4:17 PM

    I tested SELECT (3) as temp and that worked fine, so I'm still wondering what the difference is.... read more »

  • Translate Microsoft SQL (MSSQL) To MySQL

    Posted on Apr 15, 2008 at 5:17 PM

    I don't think MySQL has a direct equivalent for MSSQL's table-valued variables. (These were new in SQL Server 2000, and they aren't a widely-implemented feature, as far as I know). Update/Delete queries using joins - MSSQL: UPDATE a SET foo = 'bar' FROM a JOIN b ON a.baz = b.baz MySQL: UPDA... read more »

  • Getting @@RowCount After SQL INSERT INTO Statement

    Posted on Nov 29, 2007 at 6:04 PM

    @Ben, That's not quite right. IDENT_CURRENT is going to be subject to returning the wrong information if there are multiple simultaneous inserts on the table. I believe that if it's in an explicit transaction, IDENT_CURRENT will be the same as @@IDENTITY in all situations, but I feel a lot more c... read more »

  • CFParam And Regex-Pattern Is Quite Awesome

    Posted on Nov 19, 2007 at 10:53 AM

    I see what you're saying now. In fact I think we're in agreement about this.... read more »

  • CFParam And Regex-Pattern Is Quite Awesome

    Posted on Nov 19, 2007 at 10:40 AM

    Okay, now I'm confused. I'm talking about the case when the form input doesn't match the regex. According to your previous reply, that throws an exception, which has to be caught. My comment is that I'd prefer to catch that failed validation without throwing an exception. I agree that throwing a... read more »

  • CFParam And Regex-Pattern Is Quite Awesome

    Posted on Nov 19, 2007 at 10:29 AM

    Interesting. I like the idea conceptually, but as mentioned by a few commenters on your previous post, the idea of throwing an exception for a validation failure seems a little extreme (even if the exception is caught in the same tag).... read more »

  • CFParam And Regex-Pattern Is Quite Awesome

    Posted on Nov 19, 2007 at 10:09 AM

    What does cfparam do if the value is defined but doesn't match the regex? Throw an error, or use the default value?... read more »