<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>The ColdFusion Doctor</title>
	<atom:link href="http://cfdoctor.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://cfdoctor.wordpress.com</link>
	<description>ColdFusion development, best practices and solutions</description>
	<lastBuildDate>Mon, 21 Dec 2009 17:26:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='cfdoctor.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>The ColdFusion Doctor</title>
		<link>http://cfdoctor.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://cfdoctor.wordpress.com/osd.xml" title="The ColdFusion Doctor" />
	<atom:link rel='hub' href='http://cfdoctor.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Mozilla Firefox and debugging code</title>
		<link>http://cfdoctor.wordpress.com/2009/12/21/mozilla-firefox-and-debugging-code/</link>
		<comments>http://cfdoctor.wordpress.com/2009/12/21/mozilla-firefox-and-debugging-code/#comments</comments>
		<pubDate>Mon, 21 Dec 2009 17:26:38 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Development idea]]></category>
		<category><![CDATA[Opinion]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mozilla]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=80</guid>
		<description><![CDATA[The Web Developer addon has enough tools to keep you playing with the browser for hours alone. Firebug will help you get through just about any basic javascript issue you come across. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=80&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently downloaded the updated Firefox (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.6) Gecko/20091201 Firefox/3.5.6 (.NET CLR 3.5.30729)) for its great debugging extras. I would recommend 2 add-ons specifically:</p>
<p>Web Developer<br />
Firebug</p>
<p>The Web Developer addon has enough tools to keep you playing with the browser for hours alone. Firebug will help you get through just about any basic javascript issue you come across. Some of the main tools in Web Developer:</p>
<p>CSS<br />
&#8211;enable/disable<br />
&#8211;View style information<br />
&#8211;Use border box model<br />
FORMS<br />
&#8211;Clear radios<br />
&#8211;Populate form fields<br />
&#8211;Remove maxlengths<br />
&#8211;view form information<br />
IMAGES<br />
&#8211;Disable images<br />
&#8211;View image dimensions<br />
&#8211;view image paths<br />
OUTLINE<br />
&#8211;frames<br />
&#8211;links<br />
&#8211;tables</p>
<p>&#8230;and so much more. This is definitely one of the best tools in the industry. Download the new Firefox and grab this addon now. There is one caveat which I found slightly humorous. After you install Firefox, make sure you check the IE shortcut in your startbar on Windows machines. It seems someone&#8217;s been messing with the shortcut path and added the infamous &#8220;extoff&#8221; switch which starts IE with all Active X contrls disabled. Simply remove the switch and rename your shortcut to go back to &#8220;normal&#8221;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/80/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/80/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/80/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=80&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/12/21/mozilla-firefox-and-debugging-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>CFWINDOW tricks</title>
		<link>http://cfdoctor.wordpress.com/2009/11/23/cfwindow-tricks/</link>
		<comments>http://cfdoctor.wordpress.com/2009/11/23/cfwindow-tricks/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 19:39:27 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Solution]]></category>
		<category><![CDATA[cfwindow]]></category>
		<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=78</guid>
		<description><![CDATA[For some reason, instead of getting the modal window, all you would see is the text and graphics of that window inline with the rest of the content. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=78&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>CFWINDOW is a great tag available originally with ColdFusion 8. It provides similar functionality to the CFPOD tag with a bit more flexibility in positioning and UI controls. </p>
<p>I recently ran into an issue on a newly launched Staging server while testing the modal display of a CFWINDOW. For some reason, instead of getting the modal window, all you would see is the text and graphics of that window inline with the rest of the content. After spenging way too much time troubleshooting we stumbled on the problem when we moved the functionality off to another testing server.</p>
<p>Basically what was happening was permissions to the CFIDE/scripts folder was blocked on the new Staging server. When this happens the client no longer has access to the javascript necessary to display the modal window properly in its default implementation. The trick? Use the CFAJAXIMPORT function:</p>
<p>This opens up access to the scripts and allows the modal to display normally on a locked down CF install. This same fix can be utilized to enable any Ajax type functionality in CF. This import tag also allows the use of a specific path to the custom tag folder if one is required.</p>
<p>Cheers,<br />
Alex Kersha</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/78/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/78/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/78/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=78&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/11/23/cfwindow-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>On Service (part 2)</title>
		<link>http://cfdoctor.wordpress.com/2009/07/21/on-service-part-2/</link>
		<comments>http://cfdoctor.wordpress.com/2009/07/21/on-service-part-2/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 13:53:17 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Service]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=76</guid>
		<description><![CDATA[Having been in several managerial roles and team lead positions, it was necessary to maintain a healthy outlook in order to keep the team productive. In regards to the service industry this is even more important.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=76&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Having spent a significant amount of time in the military I found it particularly difficult to &#8220;reintegrate&#8221; with the business world. Many of my dealings early on left such a bad taste in my mouth I had a tendency to feel that most business &#8220;professionals&#8221; were either incompetent or unwilling to make the sacrifices necessary to succeed. </p>
<p>It&#8217;s been a long 20 years since then and alot of re-education. I can&#8217;t help but wonder if our past experiences; those things that shape our attitudes and wisdom, aren&#8217;t sometimes a detriment to future business relationships if left unchecked. Having been in several managerial roles and team lead positions, it was necessary to maintain a healthy outlook in order to keep the team productive. In regards to the service industry this is even more important. </p>
<p>The old addage, &#8220;The customer is always right&#8221; isn&#8217;t just a guideline. I&#8217;m sure it&#8217;s been written in stone somewhere and that&#8217;s exactly how my team and I treat it. Whether or not its actually true, its important to make the client feel that way. There is one ground rule however that we follow. In any situation where the client is obviously NOT right, we make every effort to give them several options (including their own) for them to digest for a day or so before making a solid decision. This way the client has the opportunity to come up with the right answer on their own and let us know what to do. Of course an account exec is there along the way gently nudging toward the correct &#8220;path&#8221;. </p>
<p>This doesn&#8217;t always work, there are of course those clients that insist on doing things their own way. It&#8217;s at that point that as a consultant or services company you have to decide whether or not the risk of failure is worth getting involved with them in the first place. </p>
<p>What sacrifices do you or your company make to service your client? Do you tackle issues in a consultative fashion or try to force a client down a path they don&#8217;t want to go? </p>
<p>Cheers,<br />
Alex Kersha </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=76&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/07/21/on-service-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>On Service (part 1)</title>
		<link>http://cfdoctor.wordpress.com/2009/07/21/on-service-part-1/</link>
		<comments>http://cfdoctor.wordpress.com/2009/07/21/on-service-part-1/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 13:51:51 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Service]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=74</guid>
		<description><![CDATA[My focus for this and future posts is going to be regarding service. Honest, no-nonsense service aimed at making the customer feel like a friend, not just another invoice. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=74&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>A couple days ago I stopped by a local barber shop on my way to work to see what the hours were. Having already seen the hour posted on the door I chose to stick my head in anyway and ask the man himself. </p>
<p>As I opened the door he promptly got up from his chair, came over, introduced himself and asked if I&#8217;d like a haircut. The gentleman&#8217;s name is Redd and he&#8217;s been the proprieter of this particular shop for three decades. </p>
<p>&#8220;Just checking the hours, I&#8217;m on my way to work.&#8221; I said. </p>
<p>&#8220;If you&#8217;re in a rush, I can come in early Thursday so you can get a cut before work.&#8221; </p>
<p>&#8220;No rush&#8221; I said, &#8220;but I&#8217;ll take you up on that early morning cut if you&#8217;ll be here.&#8221; </p>
<p>&#8220;I&#8217;ll be here between 7:30a and 7:45a. Come whenever you can.&#8221; </p>
<p>&#8220;Thanks alot.&#8221; Then, finding it awfully quiet in the basement of the building I quipped, &#8220;You should play some music so people know you&#8217;re here and open.&#8221; </p>
<p>&#8220;Sounds good!&#8221; Redd said. &#8220;I&#8217;ll make it happen.&#8221;<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- </p>
<p>Ok, enough of the conversation but I think you get the gist of it. My focus for this and future posts is going to be regarding service. Honest, no-nonsense service aimed at making the customer feel like a friend, not just another invoice. </p>
<p>I will admit, I found it a bit surprising at the earliest part of the day to meet someone so interested in my business that they would come in even earlier to get it. Beyond that, there was no hesitation to do the &#8220;meet and greet&#8221;. I honestly felt like I could sit there all day and talk with this guy Redd I had only met seconds before. </p>
<p>The takeaway for every salesperson and every small business owner should be this:<br />
Clean, straight forward and honest service which makes your client feel like they are your number one priority is the key to success. Everything else is secondary. </p>
<p>As an aside, this morning as I walked down the stairs for my informal &#8220;appointment&#8221; I was met by the jubilant tunes of Benny Goodman floating along the hallway. Nearing the barber shop, I realized Redd had made good on his promise and as I turned the corner was met with a wide smile and a handshake at the door. </p>
<p>What have you done for YOUR clients lately? </p>
<p>Cheers,<br />
Alex Kersha</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/74/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/74/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/74/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=74&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/07/21/on-service-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>Using SQL BULK INSERT</title>
		<link>http://cfdoctor.wordpress.com/2009/05/01/using-sql-bulk-insert/</link>
		<comments>http://cfdoctor.wordpress.com/2009/05/01/using-sql-bulk-insert/#comments</comments>
		<pubDate>Fri, 01 May 2009 16:26:02 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Development idea]]></category>
		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=71</guid>
		<description><![CDATA[Using BULK INSERT ... I have an example of the query used inside of a CFQUERY tag to bulk insert over 300 thousand accounts and related information into a SQL table in under a minute. <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=71&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have just a short blog today but something you may find very useful.</p>
<p>I recently came across a utility in SQL that may solve alot of issues out there with running multiple insert statements into the same table using a loop. When working as a DBA with SQL 2000, I used this technique quite a bit. Since however, I haven&#8217;t had much call for it so it gets &#8220;lost&#8221;. Then I get a request from a client to create an interface that they could use to upload a file of bank account numbers that would be used to handle the reallocation of deposit monies across several banks. The catch was that there could literally be 1/2 million accounts being processed at a time so the conventional loop over the account numbers to run an insert statement was totally out of the question.</p>
<p>Enter the BULK INSERT SQL command. I&#8217;ve included the basic syntax below:</p>
<p>BULK INSERT [ database_name . [ schema_name ] . | schema_name . ] [ table_name | view_name ] FROM &#8216;data_file&#8217; [ WITH ( [ [ , ] BATCHSIZE = batch_size ] [ [ , ] CHECK_CONSTRAINTS ] [ [ , ] CODEPAGE = { &#8216;ACP&#8217; | &#8216;OEM&#8217; | &#8216;RAW&#8217; | &#8216;code_page&#8217; } ] [ [ , ] DATAFILETYPE = { &#8216;char&#8217; | &#8216;native&#8217;| &#8216;widechar&#8217; | &#8216;widenative&#8217; } ] [ [ , ] FIELDTERMINATOR = &#8216;field_terminator&#8217; ] [ [ , ] FIRSTROW = first_row ] [ [ , ] FIRE_TRIGGERS ] [ [ , ] FORMATFILE = &#8216;format_file_path&#8217; ] [ [ , ] KEEPIDENTITY ] [ [ , ] KEEPNULLS ] [ [ , ] KILOBYTES_PER_BATCH = kilobytes_per_batch ] [ [ , ] LASTROW = last_row ] [ [ , ] MAXERRORS = max_errors ] [ [ , ] ORDER ( { column [ ASC | DESC ] } [ ,...n ] ) ] [ [ , ] ROWS_PER_BATCH = rows_per_batch ] [ [ , ] ROWTERMINATOR = &#8216;row_terminator&#8217; ] [ [ , ] TABLOCK ] [ [ , ] ERRORFILE = &#8216;file_name&#8217; ] )] </p>
<p>A couple key points to remember:<br />
1. If the web server you&#8217;re uploading the file from is a different box from the DB server then you&#8217;ll need to use UNC pathing in the command to get it to work.<br />
2. The ROWTERMINATOR defaults to cr/LF so in most cases you shouldn&#8217;t need to define it. I used &#8220;|&#8221; (verticle line) as a FIELDTERMINATOR argument. </p>
<p>The SQL statement itself is a P.I.A. to get right but once you do, the rest is gravy. </p>
<p>Below I have an example of the query used inside of a CFQUERY tag to bulk insert over 300 thousand accounts and related information into a SQL table in under a minute. </p>
<p>Don&#8217;t forget that when using BULK INSERT, the flat text file columns must match the type and length of the SQL table EXACTLY. Even if you have defaults defined on columns or an auto-increment column, the file must include these for the BULK INSERT to work. Lastly, the CF admin datasource being used to connect to the DB MUST run under an account that has privileges to open the txt that&#8217;s been saved there during your upload process.</p>
<p>BULK INSERT STATEMENT (enclose in cfquery tags). THe UNC path is pointing to a remote server with a drive share &#8220;D$&#8221;:</p>
<p>BULK INSERT Accounts_table FROM  &#8216;\\192.168.11.1\D$\uploaded_file.txt&#8217;  WITH (FIELDTERMINATOR = &#8216;|&#8217;)	</p>
<p>Cheers</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/71/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/71/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/71/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=71&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/05/01/using-sql-bulk-insert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>CFSCRIPT and ColdFusion component calls</title>
		<link>http://cfdoctor.wordpress.com/2009/03/26/cfscript-and-coldfusion-component-calls/</link>
		<comments>http://cfdoctor.wordpress.com/2009/03/26/cfscript-and-coldfusion-component-calls/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 15:18:29 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Development idea]]></category>
		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=63</guid>
		<description><![CDATA[Enter cfscript and the easy interaction with Java objects, properties and methods. In the code block below I use cfscript to call a ColdFusion component, instantiate that object using one of its methods (fileReady) and increment a counter. All this is wrapped in a Do .. While loop that verifies the file is ready for at least 30 seconds.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=63&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently had an opportunity to write a bunch of functionality that required checking the status of a file (open, readable, locked, etc) and only continuing once the application was sure that the file was &#8220;ready&#8221;. In other languages such as Java and .Net there are several ways to do this but being so close to Java objects inside ColdFusion, I chose to go that route.</p>
<p>The important thing to point out however is that because our environments are mixed (CFMX7 and CF8) I needed a solution that wasn&#8217;t strictly dependent on all the new functionality with CF8 file operations. Enter cfscript and the easy interaction with Java objects, properties and methods. In the code block below I use cfscript to call a ColdFusion component, instantiate that object using one of its methods (fileReady) and increment a counter. All this is wrapped in a Do .. While loop that verifies the file is ready for at least 30 seconds. Comments are provided throughout the code for explanations of process. Begining and ending greater thaan and less than signs have been removed to allow posting of code.</p>
<p><code><br />
//instantiate the Java thread object to setup a wait state<br />
cfset thread = CreateObject("java", "java.lang.Thread")<br />
cfset thread = thread.currentThread()</p>
<p>//initiate a counter<br />
cfset int_loop_counter = 0</p>
<p>cfscript<br />
	//wait 10 seconds and then begin processing<br />
	do{<br />
		waitTime = thread.sleep(10000);<br />
		//instantiate a ColdFusion cfc and call the fileReady method with the file to act on<br />
		myFileReady = createObject("component","act_file_util").fileReady(str_file_Path="#strPath#test.txt");<br />
		//if the component returns "1", increment the counter and repeat<br />
		if(myFileReady EQ 1)<br />
			int_loop_counter = int_loop_counter + 1;<br />
		else int_loop_counter = 0;</p>
<p>	}<br />
	//stop processing once the file is ready for 30 seconds<br />
	while (int_loop_counter LT 3);</p>
<p>/cfscript</p>
<p></code></p>
<p>Next week, I&#8217;ll post the file checking utility itself and how that was produced.<br />
Cheers.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/63/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/63/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/63/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=63&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/03/26/cfscript-and-coldfusion-component-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>SQL list and array handling</title>
		<link>http://cfdoctor.wordpress.com/2009/03/13/sql-list-and-array-handling/</link>
		<comments>http://cfdoctor.wordpress.com/2009/03/13/sql-list-and-array-handling/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 19:38:26 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Development idea]]></category>
		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=57</guid>
		<description><![CDATA[In an effort to provide a follow up from my last development discussion &#8220;Multidimensional Arrays&#8221; I&#8217;d like to briefly discuss what I feel are huge holes in the SQL development arena. SQL by nature is focused on processing objects as groups or sets of rows. As soon as you enter the realm of cursors and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=57&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In an effort to provide a follow up from my last development discussion &#8220;Multidimensional Arrays&#8221; I&#8217;d like to briefly discuss what I feel are huge holes in the SQL development arena. SQL by nature is focused on processing objects as groups or sets of rows. As soon as you enter the realm of cursors and loops to process one data row at a time with various operators the performance takes a dive. There are ways to make much more efficient the handling of loops rather than using cursors but this isn&#8217;t my focus today. Rather I&#8217;d like to focus on how we can use lists and even representations of arrays and process multiple records at a time using only SQL.</p>
<p>The List &#8230;<br />
Consider a simple query where you&#8217;d like to run an update of several products using the id key field. The list of product IDs is being passed into SQL and looks like :<br />
&#8217;210A34,210B35,210C36&#8242;</p>
<p>Our query to do the update would look something like:</p>
<p><code>Update Products<br />
Set status = 0<br />
Where productID IN (@productList)</code></p>
<p>The problem is that SQL compiler will fail on this syntax because the list itself is not a quoted list. There are several ways to avoid this limitation on the front end with various languages but our focus is solving the issue in SQL. </p>
<p>The array&#8230;<br />
Very much like a list, the array is a list of groups. Taking the above example as a basis, consider wanting to update both the price and status for a product in a single query without having to loop through a code block on the front end. Our array being passed to SQL would look like:<br />
&#8217;21034|4.50|1,21035|7.75|0,21036|5.75|1&#8242;</p>
<p>Here we&#8217;ve used a comma to delimit each &#8220;group&#8221; and the &#8220;|&#8221; to delimit each dimension of the array; in this case a 3 dimensional array. The first position indicates the productID, the second is the price and the last the status.</p>
<p>Try using that in a similar update statement as above and you&#8217;ll get the same complaint from SQL&#8217;s compiler. Below I&#8217;ve included the code for both a UDF to parse a list of values and one to parse our array representation. You&#8217;ll find the syntax of the code used to return the tabular data in the comment blocks at the top of the functions.</p>
<p>Tabular Function: dbo.splitList<br />
<code><br />
ALTER FUNCTION [dbo].[f_splitList]<br />
(<br />
	@str_list varchar(3000)<br />
,	@delim char(1)<br />
)<br />
RETURNS @listMembers TABLE(pkid int Identity(1,1) NOT NULL,<br />
	str_list_member varchar(20) NOT NULL<br />
	)<br />
/*********************************************************<br />
Author: Alex Kersha akersha@fusionapps.com</p>
<p>Purpose: Support parsing a list in SQL</p>
<p>Syntax: select * from dbo.f_splitList('21034,21035,21036',',')</p>
<p>Updates:<br />
Date		Name			Detail<br />
----------------------------------------------------------</p>
<p>*********************************************************/</p>
<p>AS<br />
BEGIN<br />
	declare<br />
		@pos int<br />
	,	@str_list_member varchar(20)<br />
	--create temporary table to hold the transaction<br />
	if ((@str_list is not null) and (len(@str_list) &gt; 0))<br />
	begin<br />
		--let’s loop through the list<br />
		set @pos = charIndex(@delim,@str_list)<br />
		while @pos &gt; 0<br />
		begin<br />
			--get one member<br />
			set @str_list_member = substring(@str_list, 1, @pos -1)<br />
			--strip this block from the list<br />
			--set @str_list = substring(@str_list, @pos + 1, len(@str_list) - @pos)<br />
			set @str_list = REPLACE(@str_list, @str_list_member + ',', '')</p>
<p>			--insert that value to the temp table<br />
			insert into @listMembers (str_list_member)<br />
			values (@str_list_member)</p>
<p>			--find the new position for the next block<br />
			set @pos = charindex(@delim, @str_list)<br />
		end</p>
<p>		--insert the last block from list<br />
		IF LEN(@str_list) &gt; 0<br />
		begin<br />
			set @str_list_member = @str_list</p>
<p>			insert into @listMembers (str_list_member)<br />
			values (@str_list_member)</p>
<p>		end		</p>
<p>	end</p>
<p>RETURN;</p>
<p>END<br />
</code></p>
<p>Tabular Function: dbo.splitArray_3<br />
<code><br />
ALTER FUNCTION [dbo].[f_splitArray_3]<br />
(<br />
	@str_array varchar(3000)<br />
,	@delim char(1)<br />
)<br />
RETURNS @arrayMembers TABLE(pkid int Identity(1,1) NOT NULL,<br />
	str_position_one varchar(20) NULL,<br />
	str_position_two varchar(20) NULL,<br />
	str_position_three varchar(20) NULL<br />
	)<br />
/*********************************************************<br />
Author: Alex Kersha akersha@fusionapps.com</p>
<p>Purpose: Support parsing a 3 dimensional array in SQL</p>
<p>Syntax: select * from dbo.f_splitArray_3('21034|8:30|9:30,21035|9:30|10:30',',')</p>
<p>Updates:<br />
Date		Name			Detail<br />
----------------------------------------------------------</p>
<p>*********************************************************/<br />
AS<br />
BEGIN<br />
	declare<br />
		@pos int<br />
	,	@str_array_member varchar(61)<br />
	,	@str_position_one varchar(20)<br />
	,	@str_position_two varchar(20)<br />
	,	@str_position_three varchar(20)<br />
	--create temporary table to hold the transaction<br />
	if ((@str_array is not null) and (len(@str_array) &gt; 0))<br />
	begin<br />
		--let’s loop through the list<br />
		set @pos = charIndex(@delim,@str_array)<br />
		while @pos &gt; 0<br />
		begin<br />
			--get one member<br />
			set @str_array_member = substring(@str_array, 1, @pos -1)</p>
<p>			--strip this block from the list<br />
			--set @str_array = substring(@str_array, @pos + 1, len(@str_array) - @pos)<br />
			set @str_array = REPLACE(@str_Array, @str_array_member + ',', '')</p>
<p>			--now find the first and second positions<br />
			set @pos = charIndex('|', @str_array_member)<br />
			set @str_position_one = substring(@str_array_member, 1, @pos -1)<br />
			set @str_array_member = REPLACE(@str_array_member,@str_position_one + '|', '')<br />
			set @pos = charIndex('|', @str_array_member)<br />
			set @str_position_two = substring(@str_array_member, 1, @pos -1)<br />
			set @str_array_member = REPLACE(@str_array_member,@str_position_two + '|', '')<br />
			set @pos = charIndex('|', @str_array_member)<br />
			set @str_position_three = substring(@str_array_member, @pos +1, len(@str_array_member) - @pos)</p>
<p>			--insert that value to the temp table<br />
			insert into @arrayMembers (str_position_one,str_position_two,str_position_three)<br />
			values (@str_position_one,@str_position_two,@str_position_three)</p>
<p>			--find the new position for the next block<br />
			set @pos = charindex(@delim, @str_array)<br />
		end</p>
<p>		--insert the last block<br />
		IF LEN(@str_array) &gt; 0<br />
		begin<br />
			set @str_array_member = @str_array<br />
			set @pos = charIndex('|', @str_array_member)<br />
			set @str_position_one = substring(@str_array_member, 1, @pos -1)<br />
			set @str_array_member = REPLACE(@str_array_member,@str_position_one + '|', '')<br />
			set @pos = charIndex('|', @str_array_member)<br />
			set @str_position_two = substring(@str_array_member, 1, @pos -1)<br />
			set @str_array_member = REPLACE(@str_array_member,@str_position_two + '|', '')<br />
			set @pos = charIndex('|', @str_array_member)<br />
			set @str_position_three = substring(@str_array_member, @pos +1, len(@str_array_member) - @pos)</p>
<p>			insert into @arrayMembers (str_position_one,str_position_two,str_position_three)<br />
			values (@str_position_one,@str_position_two,@str_position_three)<br />
		end</p>
<p>	end</p>
<p>RETURN;</p>
<p>END<br />
</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=57&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/03/13/sql-list-and-array-handling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>Time for the shepherds</title>
		<link>http://cfdoctor.wordpress.com/2009/03/13/time-for-the-shepherds/</link>
		<comments>http://cfdoctor.wordpress.com/2009/03/13/time-for-the-shepherds/#comments</comments>
		<pubDate>Fri, 13 Mar 2009 18:14:31 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Chat]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=39</guid>
		<description><![CDATA[If there was ever a great time to be hiring, now is it. Especially in the software development industry, the market is soon to be flooded with great talent what with all the recent layoffs and those sure to follow soon.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=39&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If there was ever a great time to be hiring, now is it. Especially in the software development industry, the market is soon to be flooded with great talent what with all the recent layoffs and those sure to follow soon.</p>
<p>The good news: many companies that are in the position to hire because they&#8217;ve been putting it off for so long due to cost, can now pick up some great talent for much less than perhaps six months ago.<br />
The bad news: the grads getting out of college the next couple years will have an awful time of it getting their first job in a career that they went to school for.</p>
<p>Companies must realize at this point that with all the experienced talent out there looking for jobs, it just doesn&#8217;t make sense to trust that network or software application to someone with no real world experience at all. My suggestion to my brothers and sisters in the engineering fields, don&#8217;t try hold out for that higher salary this time. Jump on a position that makes sense and hang on for dear life.</p>
<p>For the grads out there, you may just have to hang on for a time and take something not necessarily in your career choice until the time is right. Of course, though this is a very tough market to be starting out on your career in, it is also a perfect opportunity for those entrepreneurs out there to come up with a better way to do something &#8230; anything. This is the season for inventors, entrepreneurs, doers, enablers. The time of the sheep is past and the shepherds need to rise.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/39/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/39/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/39/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=39&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/03/13/time-for-the-shepherds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>Multidimensional arrays</title>
		<link>http://cfdoctor.wordpress.com/2009/02/23/multidimensional-arrays/</link>
		<comments>http://cfdoctor.wordpress.com/2009/02/23/multidimensional-arrays/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:53:52 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Development idea]]></category>
		<category><![CDATA[Solution]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=49</guid>
		<description><![CDATA[I recently ran into a common problem with application development: running SQL queries inside of a loop to grab the next record and associated datarows from the database. The queries had to be run in a loop because the data was coming from different datasources. Each run through the loop saw a different ODBC connection [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=49&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I recently ran into a common problem with application development: running SQL queries inside of a loop to grab the next record and associated datarows from the database. The queries had to be run in a loop because the data was coming from different datasources. Each run through the loop saw a different ODBC connection being used. </p>
<p>If you have direct control over the database and an IT department flexible enough to allow it, there are several different ways this could&#8217;ve been solved on the SQL side to allow easier access to the data. Unfortunately I didn&#8217;t have any of those options so the issue had to be taken care of in ColdFusion. In general, running any kind of query in a loop is a bad thing. This is even more the case when that loop creates unnecessary SQL connections and drops each time through. </p>
<p>What I chose to use instead was an array that I would fill with data and use to compare against the resultset of a single query for data output. Without going into details about the application or the data being used, I&#8217;ve included some code below to display how a multi-dimensional array is loaded and looped through. All starting and ending tag characters have been deleted for posting.</p>
<p>	CREATE an array to hold each  ID and the associated data for that ID<br />
	CFSET ar_activeJobs = ArrayNew(2)<br />
	CFSET lst_jobs = &#8220;&#8221;<br />
	CFSET int_count1 = 0<br />
	CFSET int_count2 = 0<br />
	CFOUTPUT query=&#8221;qry_active_jobs&#8221; group=&#8221;int_agent_nbr&#8221;<br />
		cfset int_count1 = int_count1 + 1<br />
		cfset int_count2 = int_count2 + 1&gt;<br />
		cfset ar_activeJobs[1][#int_count1#] = &#8216;#int_agent_nbr#&#8217;</p>
<p>		cfoutput<br />
			cfset lst_jobs = ListAppend(lst_jobs, &#8216;#int_job_id#&#8217;)<br />
		/cfoutput</p>
<p>		cfset ar_activeJobs[2][#int_count2#] = &#8216;#lst_jobs#&#8217;<br />
		cfset lst_jobs = &#8220;&#8221;<br />
	/CFOUTPUT</p>
<p> Loop through the array position 1, pulling the ID nbr and associated jobid&#8217;s<br />
	CFLOOP from=&#8221;1&#8243; to=&#8221;#ArrayLen(ar_activeJobs[1])#&#8221; index=&#8221;ii&#8221;<br />
		CFSET str_new_data = &#8220;#ar_activeJobs[1][ii]#-&#8221;</p>
<p>		&#8230;Perform all your actions on the data &#8230;<br />
	/CFLOOP</p>
<p>Looping through the second position of the array would be similar and look like:</p>
<p>CFLOOP from=&#8221;1&#8243; to=&#8221;#ArrayLen(ar_activeJobs[2])#&#8221; index=&#8221;ii&#8221;<br />
&#8230;<br />
/CFLOOP</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/49/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/49/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/49/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=49&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/02/23/multidimensional-arrays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
		<item>
		<title>Time Entry Troubles</title>
		<link>http://cfdoctor.wordpress.com/2009/02/09/time-entry-troubles/</link>
		<comments>http://cfdoctor.wordpress.com/2009/02/09/time-entry-troubles/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 15:53:45 +0000</pubDate>
		<dc:creator>cfdoctor</dc:creator>
				<category><![CDATA[Chat]]></category>
		<category><![CDATA[Opinion]]></category>

		<guid isPermaLink="false">http://cfdoctor.wordpress.com/?p=44</guid>
		<description><![CDATA[Why is it that every firm that bills out to clients for hourly work immediately assumes that by tracking their employee's every minute throughout the day will somehow make them more productive?<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=44&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Why is it that every firm that bills out to clients for hourly work immediately assumes that by tracking their employee&#8217;s every minute throughout the day will somehow make them more productive? Every firm I&#8217;ve been involved with has at some point chosen to move from a ticket/time entry system that works to one that just .. well, doesn&#8217;t.</p>
<p>The arguments are always the same, we&#8217;ll be more productive, we&#8217;ll get better metrics and be able to focus on billable work, etc, etc. If this was in fact the actual reason for the switch I might be more inclined to agree. Unfortunately the reality is that employees become less productive, more paranoid and certainly less trusting of their employers.</p>
<p>Imagine having to keep track of every 15 minute block of your day. Need a smoke, too bad, there just isn&#8217;t a charge code for that. Need to hit the loo? Sorry, not chargeable and should you have to wait in the long line after lunch for the first available stall, too bad. Ok, ok these are extreme examples but seriously, how many things in your organization or specific job requirement can actually be completed in 15 minutes? Anything? I can think of very few, most of them having nothing to do with billable work.</p>
<p>There is a fine line between productivity and a waste of time. That line, when it comes to time reporting is usually a 15 minute block. My point is that 30 minutes should be more than granular enough for even the most discerning client. The reality is that there just aren&#8217;t too many things that can be accomplished in less time without an automated system. Think about it, write a list of all the things you do during a single business day. Now separate that list into things that should be billed against a client (not what you&#8217;d like to bill them for) and those that shouldn&#8217;t. Of the things that are really relevant, that the client will pay you for, how many can you complete in 15 minutes or less?</p>
<p>Cheers.<br />
Alex Kersha</p>
<p>http://www.linkedin.com/in/alexkersha</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/cfdoctor.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/cfdoctor.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/cfdoctor.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/cfdoctor.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/cfdoctor.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/cfdoctor.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/cfdoctor.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/cfdoctor.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/cfdoctor.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/cfdoctor.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/cfdoctor.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/cfdoctor.wordpress.com/44/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/cfdoctor.wordpress.com/44/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/cfdoctor.wordpress.com/44/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=cfdoctor.wordpress.com&amp;blog=5342139&amp;post=44&amp;subd=cfdoctor&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://cfdoctor.wordpress.com/2009/02/09/time-entry-troubles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0171fa48e7c4c7f5fd42c31f54a043a9?s=96&#38;d=http%3A%2F%2F0.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=R" medium="image">
			<media:title type="html">cfdoctor</media:title>
		</media:content>
	</item>
	</channel>
</rss>
