<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ColdFusion UUID and MSSQL newID()</title>
	<atom:link href="http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/</link>
	<description>Rich Internet Application development</description>
	<lastBuildDate>Wed, 28 Jul 2010 22:50:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: chapter31 &#187; Blog Archive &#187; Returning random results with MySQL</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-43448</link>
		<dc:creator>chapter31 &#187; Blog Archive &#187; Returning random results with MySQL</dc:creator>
		<pubDate>Fri, 28 Mar 2008 17:01:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-43448</guid>
		<description>[...] mightn&#8217;t be so bad. Another constraint is that it assumes an integer primary key which you may not be using, meaning the randRange() won&#8217;t work. Also what happens if you don&#8217;t have sequential [...]</description>
		<content:encoded><![CDATA[<p>[...] mightn&#8217;t be so bad. Another constraint is that it assumes an integer primary key which you may not be using, meaning the randRange() won&#8217;t work. Also what happens if you don&#8217;t have sequential [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adrian Lynch</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-30590</link>
		<dc:creator>Adrian Lynch</dc:creator>
		<pubDate>Tue, 18 Dec 2007 13:10:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-30590</guid>
		<description>I don&#039;t like using them as a PK, but I do use them as a public ID for unsubscribe emails, URLs made public etc.

So if I need them I have both a regular userID column and a publicUserID column in the same table.

It&#039;s worked out nicely so far.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t like using them as a PK, but I do use them as a public ID for unsubscribe emails, URLs made public etc.</p>
<p>So if I need them I have both a regular userID column and a publicUserID column in the same table.</p>
<p>It&#8217;s worked out nicely so far.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1653</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Wed, 31 Jan 2007 10:13:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1653</guid>
		<description>Hi Adam,

You might want to do aggregate functions on an int (identity), especially during development. You know...give me all users with an ID &gt; 100 or something. Just makes is easy. You wouldn&#039;t of course want to do it on a UUID :)

Sorry about the less than/greater than...I&#039;m using Wordpress which is PHP. It&#039;s actually fantastic, but I&#039;d much rather be using a ColdFusion blog!

Something I need to look into soon :)</description>
		<content:encoded><![CDATA[<p>Hi Adam,</p>
<p>You might want to do aggregate functions on an int (identity), especially during development. You know&#8230;give me all users with an ID &gt; 100 or something. Just makes is easy. You wouldn&#8217;t of course want to do it on a UUID <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Sorry about the less than/greater than&#8230;I&#8217;m using Wordpress which is PHP. It&#8217;s actually fantastic, but I&#8217;d much rather be using a ColdFusion blog!</p>
<p>Something I need to look into soon <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Cameron</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1650</link>
		<dc:creator>Adam Cameron</dc:creator>
		<pubDate>Wed, 31 Jan 2007 09:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1650</guid>
		<description>&quot;Why on Earth would you WANT to do max(), min(), on a UUID?&quot;

should read 

&quot;Why on Earth would you WANT to do max(), min(), &lt; or &gt; on a UUID?

How come your blog removes angle-brackets (well, in this case, contextually they WEREN&#039;T angle brackets).

-- 
Adam</description>
		<content:encoded><![CDATA[<p>&#8220;Why on Earth would you WANT to do max(), min(), on a UUID?&#8221;</p>
<p>should read </p>
<p>&#8220;Why on Earth would you WANT to do max(), min(), &lt; or &gt; on a UUID?</p>
<p>How come your blog removes angle-brackets (well, in this case, contextually they WEREN&#8217;T angle brackets).</p>
<p>&#8211;<br />
Adam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Cameron</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1649</link>
		<dc:creator>Adam Cameron</dc:creator>
		<pubDate>Wed, 31 Jan 2007 09:55:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1649</guid>
		<description>Hi again
Sorry, I was not suggesting using a CF-formatted UUID for anything.   I was meaning &quot;an actual UUID&quot; (not one of CF&#039;s strings).  So, on MS-SQL, yeah, a &quot;uniqueidentifier&quot;.

Why on Earth would you WANT to do max(), min(),  on a UUID?  It makes no sense to want to.  I think if one finds oneself doing that sort of thing... time to rethink the DB schema, or what one&#039;s actually trying to achieve (because the approach is probably wrong).

Anyway, interesting input from everyone, so that&#039;s all good! :-)

-- 
Adam</description>
		<content:encoded><![CDATA[<p>Hi again<br />
Sorry, I was not suggesting using a CF-formatted UUID for anything.   I was meaning &#8220;an actual UUID&#8221; (not one of CF&#8217;s strings).  So, on MS-SQL, yeah, a &#8220;uniqueidentifier&#8221;.</p>
<p>Why on Earth would you WANT to do max(), min(),  on a UUID?  It makes no sense to want to.  I think if one finds oneself doing that sort of thing&#8230; time to rethink the DB schema, or what one&#8217;s actually trying to achieve (because the approach is probably wrong).</p>
<p>Anyway, interesting input from everyone, so that&#8217;s all good! <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>&#8211;<br />
Adam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Sharman</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1613</link>
		<dc:creator>Michael Sharman</dc:creator>
		<pubDate>Tue, 30 Jan 2007 21:34:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1613</guid>
		<description>Tony: Although you can use &gt; and &lt; your primary keys are sequential so (particularly during development) you need to find something else to use when you want to quickly grab a range of records. Most likely you&#039;ll have a DateTimeCreated or some such column, but an int/identity does make it easier :)

Christopher: Thanks for the link, nice one! If you were in a stored procedure you could of course create a single newID() and put it in a variable to use, but this way is just simpler! Thanks again</description>
		<content:encoded><![CDATA[<p>Tony: Although you can use &gt; and &lt; your primary keys are sequential so (particularly during development) you need to find something else to use when you want to quickly grab a range of records. Most likely you&#8217;ll have a DateTimeCreated or some such column, but an int/identity does make it easier <img src='http://www.chapter31.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Christopher: Thanks for the link, nice one! If you were in a stored procedure you could of course create a single newID() and put it in a variable to use, but this way is just simpler! Thanks again</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christopher Wigginton</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1606</link>
		<dc:creator>Christopher Wigginton</dc:creator>
		<pubDate>Tue, 30 Jan 2007 15:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1606</guid>
		<description>Great post Michael,

Your concat function which uses newid() twice is actually creating two ms uuids and you&#039;re combining them together.  This is ideal for a user defined function which would be reusable across the database.  I whipped up quick function for this and put it on my blog if you&#039;re interested.

&lt;a href=&quot;http://www.intersuite.com/client/index.cfm/2007/1/30/MSSQL-CFUUID-Function&quot; rel=&quot;nofollow&quot;&gt;MSSQL CFUUID Function&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>Great post Michael,</p>
<p>Your concat function which uses newid() twice is actually creating two ms uuids and you&#8217;re combining them together.  This is ideal for a user defined function which would be reusable across the database.  I whipped up quick function for this and put it on my blog if you&#8217;re interested.</p>
<p><a href="http://www.intersuite.com/client/index.cfm/2007/1/30/MSSQL-CFUUID-Function" rel="nofollow">MSSQL CFUUID Function</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Nelson</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1604</link>
		<dc:creator>Steve Nelson</dc:creator>
		<pubDate>Tue, 30 Jan 2007 14:04:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1604</guid>
		<description>ugggh, &lt; didnt work.

&lt;cfset myid=replace(createuuid(),&quot;-&quot;,&quot;&quot;,&quot;all&quot;)&gt;</description>
		<content:encoded><![CDATA[<p>ugggh, &lt; didnt work.</p>
<p>&lt;cfset myid=replace(createuuid(),&#8221;-&#8221;,&#8221;",&#8221;all&#8221;)&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Nelson</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1603</link>
		<dc:creator>Steve Nelson</dc:creator>
		<pubDate>Tue, 30 Jan 2007 14:03:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1603</guid>
		<description>I&#039;m an avid believer in UUIDs, but i can&#039;t stand the hyphons. So much so that i strip the hyphons out completely. The problem is that Javascript doesn&#039;t like hyphons in variable name. So in the fairly common situation where i have loop over PKs and dynamically name a hidden variable or a checkbox etc, the hyphons screw up the javascript code. Sorry hyphons, but you ahve to go:

</description>
		<content:encoded><![CDATA[<p>I&#8217;m an avid believer in UUIDs, but i can&#8217;t stand the hyphons. So much so that i strip the hyphons out completely. The problem is that Javascript doesn&#8217;t like hyphons in variable name. So in the fairly common situation where i have loop over PKs and dynamically name a hidden variable or a checkbox etc, the hyphons screw up the javascript code. Sorry hyphons, but you ahve to go:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tony petruzzi</title>
		<link>http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/comment-page-1/#comment-1602</link>
		<dc:creator>tony petruzzi</dc:creator>
		<pubDate>Tue, 30 Jan 2007 13:38:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.chapter31.com/2007/01/30/coldfusion-uuids-and-mssql-newid/#comment-1602</guid>
		<description>you can perform &gt; and </description>
		<content:encoded><![CDATA[<p>you can perform &gt; and</p>
]]></content:encoded>
	</item>
</channel>
</rss>
