<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-711563514187238336</id><updated>2012-02-16T21:44:08.872-08:00</updated><category term='Windows Phone'/><category term='Honours'/><category term='Gadets'/><category term='quadcopter'/><category term='Games'/><category term='Robot'/><category term='ROS'/><category term='iPhone'/><category term='World of Warcraft'/><title type='text'>Spinlock - The ramblings of a geeky type</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>19</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-1547368452145485032</id><published>2012-02-16T06:55:00.000-08:00</published><updated>2012-02-16T21:44:09.121-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Robot'/><category scheme='http://www.blogger.com/atom/ns#' term='Honours'/><category scheme='http://www.blogger.com/atom/ns#' term='ROS'/><title type='text'>Simple Servo actuation in ROS</title><content type='html'>&lt;div class="separator" style="float: right; margin: 3px; text-align: center;"&gt;&lt;object class="BLOGGER-youtube-video" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" data-thumbnail-src="http://i.ytimg.com/vi/NcO6oT-91F8/0.jpg" height="266" width="320"&gt;&lt;param name="movie" value="http://www.youtube.com/v/NcO6oT-91F8?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" /&gt;&lt;param name="bgcolor" value="#FFFFFF" /&gt;&lt;embed width="320" style="float:right;margin:3px;" height="266"  src="http://www.youtube.com/v/NcO6oT-91F8?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata" type="application/x-shockwave-flash"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;With the turmoil from Christmas, New Year, Australia day and children going to 'Big School' behind me my project needed momentum. After installing fresh copies of Ubuntu and ROS on both desktop and netbook (nice and easy&amp;nbsp;&lt;a href="http://www.ros.org/wiki/ROS/Installation" style="text-align: left;"&gt;http://www.ros.org/wiki/ROS/Installation&lt;/a&gt;&lt;span style="text-align: left;"&gt;) I set about trawling through the ROS documentation and tutorials and other peoples source code in an attempt to figure out how it all fits together.&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: left;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: left;"&gt;Of course nothing rolling up the sleeves and wiggling the front wheels seemed like the perfect 'Hello World' style verification that everything was working well.&lt;/span&gt;&lt;br /&gt;&lt;span style="text-align: left;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Using the Pololu board to drive the cars servo's proved refreshingly easy. While windows required some basic FTDI drivers, plugging the Polulo into Ubuntu automagically loads a standard Serial over USB driver.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;[12425.073822] usb 3-3: USB disconnect, device number 4&lt;br /&gt;[12426.996370] usb 3-3: new full speed USB device number 5 using ohci_hcd&lt;br /&gt;[12427.173388] cdc_acm 3-3:1.0: This device cannot do calls on its own. It is not a modem.&lt;br /&gt;[12427.173451] cdc_acm 3-3:1.0: ttyACM0: USB ACM device&lt;br /&gt;[12427.178486] cdc_acm 3-3:1.2: This device cannot do calls on its own. It is not a modem.&lt;br /&gt;[12427.178552] cdc_acm 3-3:1.2: ttyACM1: USB ACM device&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Pololu have a compact serial protocol for the maestro range of serial controllers (&lt;a href="http://www.pololu.com/docs/0J40/5.e"&gt;http://www.pololu.com/docs/0J40/5.e&lt;/a&gt;) making control as simple as writing a command to the serial device /dev/ttyACM0. Initially nothing happened, but reading further in the documentation revealed that I had to use the Pololu control centre to set an appropriate serial mode (&lt;a href="http://www.pololu.com/docs/0J40/5.a"&gt;http://www.pololu.com/docs/0J40/5.a&lt;/a&gt;) after that the following code got the wheels to wiggle back and forth.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;#!/usr/bin/python&lt;br /&gt;import math, time, serial&lt;br /&gt;&lt;br /&gt;def get_command(channel, target):&lt;br /&gt;        target = target * 4&lt;br /&gt;        serialBytes = chr(0x84)+chr(channel)+chr(target &amp;amp; 0x7F)+chr((target &amp;gt;&amp;gt; 7) &amp;amp; 0x7F)&lt;br /&gt;        return serialBytes&lt;br /&gt;&lt;br /&gt;ser = serial.Serial('/dev/ttyACM0')&lt;br /&gt;ser.write(chr(0xAA))&lt;br /&gt;ser.flush()&lt;br /&gt;&lt;br /&gt;i=0.0&lt;br /&gt;while(i&amp;lt;2*math.pi):&lt;br /&gt;        i = i+0.01&lt;br /&gt;        print math.sin(i)&lt;br /&gt;        ser.write(get_command(1,int((math.sin(i)*300)+1500)))&lt;br /&gt;        ser.write(get_command(0,int((math.sin(i)*300)+1500)))&lt;br /&gt;&lt;br /&gt;        time.sleep(0.002)&lt;br /&gt;&lt;br /&gt;ser.write(get_command(1,0))&lt;br /&gt;ser.write(get_command(0,0))&lt;br /&gt;&lt;br /&gt;ser.close()&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;There are two writes in each loop as the RC car I'm using has two steering servo's.&lt;br /&gt;&lt;br /&gt;After browsing through a variety of other peoples ROS stacks, (PI Bot, Turtlebot, ART) I found that the Austin Robotics Technology stack written for their Marvin DARPA autonomous car entry was structured &amp;nbsp;well, and included a more sophisticated set of driving messages for driving a car style robot. By basing my efforts around the way ART laid out their stack I get the benefit of a good node structure, but also exposing me to issues ART have had to consider relating to larger cars and I want my project to be expandable to ATV (or larger) sized vehicles.&lt;br /&gt;&lt;br /&gt;Using my very rusty Python and my still peripheral understanding of ROS I was able to convert the demo above into a ros node capable of consuming the ART steering message which meant;&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;I could use ART's test_steering node from the art_servo package to generate test steering messages for me.&lt;/li&gt;&lt;li&gt;I can run the pololu driver on my netbook and use the ROS_MASTER_URI environment variable to run roscore and the steering test node on my desktop.&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;While it doesn't make much sense to run these nodes across multiple computers mode, it will come in very handy when teleoperating the robot, or processing complex data from the kinect.&lt;br /&gt;&lt;br /&gt;With all that grooviness baked in I'm feeling much better about leaving behind the&amp;nbsp;comfortable&amp;nbsp;world of C# and the mindbogglingly&amp;nbsp;complex world of writing Microsoft Robotics Services manifests.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;#!/usr/bin/env python&lt;br /&gt;import roslib; roslib.load_manifest('wombot_servo')&lt;br /&gt;import rospy&lt;br /&gt;import serial&lt;br /&gt;&lt;br /&gt;from art_msgs.msg import SteeringCommand&lt;br /&gt;from art_msgs.msg import SteeringState&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;class PololuDriver(object):&lt;br /&gt;    def __init__(self):&lt;br /&gt;        rospy.init_node('pololu_driver')&lt;br /&gt;        rospy.on_shutdown(self.ShutdownCallback)&lt;br /&gt;        rospy.Subscriber("steering/cmd",SteeringCommand, self.SteeringCallback)&lt;br /&gt;&lt;br /&gt;        port = '/dev/ttyACM0'&lt;br /&gt;&lt;br /&gt;        try:&lt;br /&gt;            self.ser = serial.Serial(port)&lt;br /&gt;            self.ser.open()&lt;br /&gt;            self.ser.write(chr(0xAA))&lt;br /&gt;            self.ser.flush()&lt;br /&gt;        except serial.serialutil.SerialException as e:&lt;br /&gt;            rospy.logerr(rospy.get_name()+": Error opening or initialising port "+port)&lt;br /&gt;            exit(1)&lt;br /&gt;&lt;br /&gt;    def DegToTicks(self,degrees):&lt;br /&gt;        #quick and dirty,   assume 30 is near-extent&lt;br /&gt;        ticks = (max(-30,min(30,degrees))/30.0)*480&lt;br /&gt;        return int(ticks + 1500)&lt;br /&gt;&lt;br /&gt;    def run(self):&lt;br /&gt;        rospy.spin()&lt;br /&gt;&lt;br /&gt;    def get_command(self, channel, target):&lt;br /&gt;        target = target * 4&lt;br /&gt;        serialBytes = chr(0x84)+chr(channel)+chr(target &amp;amp; 0x7F)+chr((target &amp;gt;&amp;gt; 7) &amp;amp; 0x7F)&lt;br /&gt;        return serialBytes&lt;br /&gt;&lt;br /&gt;    def ShutdownCallback(self):&lt;br /&gt;        rospy.loginfo("Shutting down")&lt;br /&gt;        if hasattr(self, 'ser'):&lt;br /&gt;            self.ser.write(self.get_command(0,0))&lt;br /&gt;            self.ser.write(self.get_command(1,0))&lt;br /&gt;            self.ser.write(chr(0xA2))&lt;br /&gt;            self.ser.close()&lt;br /&gt;&lt;br /&gt;    def SteeringCallback(self,data):&lt;br /&gt;        ticks = self.DegToTicks(data.angle)&lt;br /&gt;        rospy.loginfo(rospy.get_name()+": Request Type="+str(data.request)+" Angle="+str(data.angle)+" Ticks="+str(ticks) )&lt;br /&gt;        ticks = self.DegToTicks(data.angle)&lt;br /&gt;        self.ser.write(self.get_command(0,ticks))&lt;br /&gt;        self.ser.write(self.get_command(1,ticks))&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;#Init and run&lt;br /&gt;PololuDriver().run()&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-1547368452145485032?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/1547368452145485032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=1547368452145485032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/1547368452145485032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/1547368452145485032'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2012/02/simple-servo-actuation-in-ros.html' title='Simple Servo actuation in ROS'/><author><name>Tim S</name><uri>http://www.blogger.com/profile/02639023335038322301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-308424161303547297</id><published>2011-10-16T15:04:00.000-07:00</published><updated>2011-10-17T03:29:40.651-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Honours'/><title type='text'>GPGPU approaches to filtering operations</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Ls2g9ZES3Z4/Tptzhs9rAmI/AAAAAAAAADs/ZGw50UGrKDM/s1600/22-KinectFusion.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="100" src="http://4.bp.blogspot.com/-Ls2g9ZES3Z4/Tptzhs9rAmI/AAAAAAAAADs/ZGw50UGrKDM/s200/22-KinectFusion.jpg" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;In fiddling around with the Kinect it has become more obvious that I will need to improve performance.&lt;br /&gt;&lt;br /&gt;The Microsoft Reserach &lt;a href="http://research.microsoft.com/apps/video/default.aspx?id=152815"&gt;KinectFusion&lt;/a&gt;&amp;nbsp;video shows capabilities that would be perfect for my honours project, creation of a smoothed 3D surface in real-time with decent reaction to transients in the scene, if only I had a few Microsoft Research and UWash prof's in my pocket.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://xenon.arcticus.com/kinect-z-buffer-noise-and-audio-beam-steering-precision"&gt;Kinect Z Buffer noise&lt;/a&gt;&lt;br /&gt;Borglabs - &lt;a href="http://borglabs.com/blog/create-point-clouds-from-kinect"&gt;Creating Pointclouds (.ply) files&lt;/a&gt; - &lt;a href="http://borglabs.com/blog/experiment-to-remove-noise-in-kinect-depth-maps"&gt;Attempt to remove noise&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;While an optimal filter hasn't emerged from either my own testing or others I will need to be filtering the depth data by evaluating&amp;nbsp;neighbors&amp;nbsp;in the space, time or both domains (the KinectFusion is at least operating over the time domain as shown by the delayed influence of changes in the scene.&lt;br /&gt;&lt;br /&gt;The KinectFusion algorithm, as well as probabilistic techniques such as those based on&amp;nbsp;&lt;a href="http://dl.acm.org/citation.cfm?id=1281965"&gt;Poisson&lt;/a&gt;&amp;nbsp;and &lt;a href="http://dl.acm.org/citation.cfm?id=1122504"&gt;Bayesian&lt;/a&gt;&amp;nbsp;&amp;nbsp;methods require surface normals for each point, which the Kinect does not provide (so far as I know). So these will also have to be calculated based upon the&amp;nbsp;neighbors&amp;nbsp;for each point.&lt;br /&gt;&lt;br /&gt;So just to create a surface we are already performing multiple operations per 'point' each requiring multiple calculations, including perhaps a median filter, which requires a sort on each point. With the 76,800 points in each 240x320 depth frame this is a problem begging for parallelism. Which, based on comments from the KinectFusion video, is exactly what they did.&lt;br /&gt;&lt;br /&gt;I would prefer to keep my application in C# if at all possible partially because I'd like to demonstrate the idea that a CLR program is quite capable of sophisticated graphical programming, but also because C++ feels like a legacy from a past life for me now (Line-Of-Business apps being my bread and butter), which means that I have a few options for increasing my parallelism.&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Standard C# multi-threading&lt;/li&gt;&lt;li&gt;.NET Parallel libraries (with functions like parallel.for() )&lt;/li&gt;&lt;li&gt;Microsoft Research Accelerator Library (allows x64 multicore, or gpu acceleration)&lt;/li&gt;&lt;li&gt;High Level Shader Language (HLSL), which the XNA framework can leverage&lt;/li&gt;&lt;li&gt;Linking to an unmanaged library to user pixel shaders (.pix) files&lt;/li&gt;&lt;li&gt;Various CUDA libraries, include CUDA.NET&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;I have a chunky GeForce GTX560Ti graphics card with 384 CUDA (general purpouse gpu) cores, and graphics cards are all heading in this direction, so I would like to use the gpu.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The MSR Accelerator library looks to be the easiest method to implement, however GPU's are all about how to get data into and out of the graphics cores, ensuring the right data is in the right place is the key, Accelerator is probably very clever about how it handles this task, but in using the library I can't manage that myself.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;I will have to create an implementation of the an algorithm, probably the median filter function (unless more details on the filter in KinectFusion get released) in&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;Normal Code&lt;/li&gt;&lt;li&gt;Microsoft Research Accelerator&lt;/li&gt;&lt;li&gt;HLSL Pixel shader&lt;/li&gt;&lt;/ul&gt;And test run time over a large number of calculations.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-308424161303547297?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/308424161303547297/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=308424161303547297' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/308424161303547297'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/308424161303547297'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2011/10/gpgpu-approaches-to-filtering.html' title='GPGPU approaches to filtering operations'/><author><name>Tim S</name><uri>http://www.blogger.com/profile/02639023335038322301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Ls2g9ZES3Z4/Tptzhs9rAmI/AAAAAAAAADs/ZGw50UGrKDM/s72-c/22-KinectFusion.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-6022302473773404591</id><published>2011-10-13T10:31:00.000-07:00</published><updated>2011-10-18T17:02:09.657-07:00</updated><title type='text'>"Robot Platform" (air-quotes intended)</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-RAC8RuOYUKQ/Tp4NAYMqLUI/AAAAAAAAAD0/CQNx3AqxAgs/s1600/traxx1.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="139" src="http://3.bp.blogspot.com/-RAC8RuOYUKQ/Tp4NAYMqLUI/AAAAAAAAAD0/CQNx3AqxAgs/s200/traxx1.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;I bit the bullet and purchased a robot platform, a Traxxas Summit.&lt;br /&gt;&lt;br /&gt;The Summit has a number of advantages over the cheaper similar sized rc vehicles such as remotely lockable center and front center diffs, waterproofing, independent&amp;nbsp;suspension (easier to simulate and&amp;nbsp;closer to ATV's, a potential future research platform), has a wide stance (useful to shield the wide Kinect sensor), and should be large enough to carry a variety of control and sensor hardware.&lt;br /&gt;&lt;br /&gt;It's also pretty cool :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-6022302473773404591?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/6022302473773404591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=6022302473773404591' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/6022302473773404591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/6022302473773404591'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2011/10/robot-platform-air-quotes-intended.html' title='&quot;Robot Platform&quot; (air-quotes intended)'/><author><name>Tim S</name><uri>http://www.blogger.com/profile/02639023335038322301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-RAC8RuOYUKQ/Tp4NAYMqLUI/AAAAAAAAAD0/CQNx3AqxAgs/s72-c/traxx1.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-8668448886561671127</id><published>2011-08-30T16:36:00.000-07:00</published><updated>2011-08-30T17:02:52.952-07:00</updated><title type='text'>Stored procedure for importing data from Oracle to Sql Server</title><content type='html'>The approach to ETL we have taken for our Data Warehouse involves staging a lot of tables before transforming into our star schema.  There are a lot of fancy tools in the SQL Server and Oracle worlds for capturing change within databases, however sometimes as a lowly programmer / DW designer you just have to do it yourself.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Many of our tables don't change from day-to-day, so it doesn't make any sense to import them if they're not needed. creating a package based on the dtswizard is easy enough, but harder to change once saved. I ended up creating a little stored procedure to determine whether a table has changed and import it if it hasn't. Using this procedure assumes you have the oracle client installed,  are using TNS, and assumes a more recent version of Oracle (I think 9+) for the lastscn functionality.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The stored proc will create two tables in your database.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;once the sp is in the db you can simply create a file with lines like the following&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;code&gt;&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ADMISSION'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_AGEGROUP'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ASCED'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ASGC'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ATAR'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ATTENDANCE_MODE'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ATTENDANCE_TYPE'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ATAR'&lt;br /&gt;EXEC procImportIfChanged 'PROD_CRD','PA_INF_ATSI'&lt;br /&gt;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;Remember,  I never said this was good, just that it works :)&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style='font-size:8pt;'&gt;&lt;br /&gt;&lt;font face="Courier New" size="2"&gt;&lt;br /&gt;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&amp;#45;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;procImportIfChanged&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Check&amp;nbsp;the&amp;nbsp;number&amp;nbsp;of&amp;nbsp;rows&amp;nbsp;in&amp;nbsp;the&amp;nbsp;table&amp;nbsp;and&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;the&amp;nbsp;'last&amp;nbsp;changed&amp;nbsp;row&amp;nbsp;scn'&amp;nbsp;to&amp;nbsp;establish&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;whether&amp;nbsp;the&amp;nbsp;table&amp;nbsp;may&amp;nbsp;be&amp;nbsp;stale.&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'procImportIfChanged'&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DROP&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;PROCEDURE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;GO&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;PROCEDURE&lt;/font&gt;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;Procimportifchanged&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;128&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;128&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;AS&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@table_stale&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;BIT&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@local_table_rows&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;INT&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@local_table_scn&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;BIGINT&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_rows&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;INT&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_scn&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;BIGINT&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;consider&amp;nbsp;table&amp;nbsp;stale&amp;nbsp;until&amp;nbsp;proven&amp;nbsp;otherwise&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@table_stale&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;Create&amp;nbsp;table&amp;nbsp;change&amp;nbsp;data&amp;nbsp;tracker&amp;nbsp;table&amp;nbsp;thingoe&amp;nbsp;if&amp;nbsp;it&amp;nbsp;doesn't&amp;nbsp;exist&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'procImportIfChanged_TableData'&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;TABLE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;128&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;128&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;local_table_crdate&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_rows&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;INT&lt;/i&gt;&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_lastscn&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;BIGINT&lt;/i&gt;&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_rows&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;INT&lt;/i&gt;&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_lastscn&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;BIGINT&lt;/i&gt;&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;Create&amp;nbsp;table&amp;nbsp;change&amp;nbsp;data&amp;nbsp;tracker&amp;nbsp;table&amp;nbsp;thingoe&amp;nbsp;if&amp;nbsp;it&amp;nbsp;doesn't&amp;nbsp;exist&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'procImportIfChanged_ImportLog'&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;CREATE&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;TABLE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_importlog&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;128&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;VARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;128&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;import_datetime&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;get&amp;nbsp;the&amp;nbsp;remote&amp;nbsp;table&amp;nbsp;rows&amp;nbsp;and&amp;nbsp;scn&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@qryTableInfo&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;NVARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;4000&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@qryTableInfo&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;N'select&amp;nbsp;table_rows,lastchange_scn&amp;nbsp;from&amp;nbsp;OPENQUERY('&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;',''select&amp;nbsp;count(*)&amp;nbsp;table_rows,max(ora_rowscn)&amp;nbsp;lastchange_scn&amp;nbsp;from&amp;nbsp;'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;''')'&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;TABLE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;tbl_rows&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;INT&lt;/i&gt;&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;tbl_lastscn&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;BIGINT&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;INTO&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;tbl_rows&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;tbl_lastscn&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;EXEC&lt;/font&gt;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;Sp_executesql&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@qryTableInfo&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_rows&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;tbl_rows&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_scn&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;tbl_lastscn&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;If&amp;nbsp;there's&amp;nbsp;no&amp;nbsp;row&amp;nbsp;for&amp;nbsp;this&amp;nbsp;table&amp;nbsp;in&amp;nbsp;the&amp;nbsp;config&amp;nbsp;table,&amp;nbsp;&amp;nbsp;create&amp;nbsp;one.&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;PRINT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'.'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;'&amp;nbsp;doesnt&amp;nbsp;exists&amp;nbsp;in&amp;nbsp;info&amp;nbsp;cache,&amp;nbsp;creating&amp;nbsp;row'&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;INTO&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;local_table_crdate&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_rows&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_lastscn&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_rows&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_lastscn&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;VALUES&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;CONVERT&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'20000101'&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;103&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_rows&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_scn&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;ELSE&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;PRINT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'.'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;'&amp;nbsp;exists&amp;nbsp;in&amp;nbsp;database&amp;nbsp;and&amp;nbsp;info&amp;nbsp;cache&amp;nbsp;table'&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@table_crdate&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;DATETIME&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@table_crdate&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;crdate&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;local_table_crdate&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@table_crdate&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;PRINT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'.'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;'&amp;nbsp;creation&amp;nbsp;date&amp;nbsp;matches&amp;nbsp;recorded&amp;nbsp;information'&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_rows&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_rows&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_lastscn&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@remote_table_scn&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "green"&gt;&lt;i&gt;&amp;#45;&amp;#45;&amp;nbsp;'un-stale'&amp;nbsp;the&amp;nbsp;table&amp;nbsp;if&amp;nbsp;the&amp;nbsp;number&amp;nbsp;of&amp;nbsp;rows,&amp;nbsp;and&amp;nbsp;last&amp;nbsp;changed&amp;nbsp;date&amp;nbsp;are&amp;nbsp;the&amp;nbsp;same&amp;nbsp;as&amp;nbsp;recorded&lt;/i&gt;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;1&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_rows&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_rows&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_lastscn&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_lastscn&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;PRINT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'.'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;'&amp;nbsp;appears&amp;nbsp;unchanged&amp;nbsp;from&amp;nbsp;local&amp;nbsp;table,&amp;nbsp;not&amp;nbsp;re-importing&amp;nbsp;table'&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@table_stale&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;0&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@table_stale&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;1&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;PRINT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'&amp;nbsp;is&amp;nbsp;stale,&amp;nbsp;dropping'&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@drop_sql&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;NVARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;4000&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@drop_sql&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;N'drop&amp;nbsp;table&amp;nbsp;'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;EXEC&lt;/font&gt;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;Sp_executesql&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@drop_sql&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;IF&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;NOT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;EXISTS&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;BEGIN&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;PRINT&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;'Loading&amp;nbsp;table&amp;nbsp;'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;DECLARE&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@load_qry&lt;/font&gt;&amp;nbsp;&lt;font color = "black"&gt;&lt;i&gt;NVARCHAR&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "black"&gt;4000&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SELECT&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@load_qry&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "red"&gt;N'select&amp;nbsp;*&amp;nbsp;INTO&amp;nbsp;'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;'&amp;nbsp;from&amp;nbsp;OPENQUERY('&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;',''select&amp;nbsp;*&amp;nbsp;from&amp;nbsp;'&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "silver"&gt;+&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "red"&gt;''')'&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;EXECUTE&lt;/font&gt;&amp;nbsp;&lt;font color = "#FF0080"&gt;&lt;b&gt;Sp_executesql&lt;/b&gt;&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@load_qry&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;local_table_crdate&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;crdate&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;FROM&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;sysobjects&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;UPDATE&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_tabledata&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;SET&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_rows&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_rows&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_lastscn&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;latest_table_lastscn&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;WHERE&lt;/font&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;AND&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&amp;nbsp;&lt;font color = "silver"&gt;=&lt;/font&gt;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;INSERT&lt;/font&gt;&amp;nbsp;&lt;font color = "blue"&gt;INTO&lt;/font&gt;&amp;nbsp;&lt;font color = "maroon"&gt;procimportifchanged_importlog&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;database_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;table_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;import_datetime&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;VALUES&lt;/font&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "#8000FF"&gt;@db_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "#8000FF"&gt;@tbl_name&lt;/font&gt;&lt;font color = "silver"&gt;,&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "fuchsia"&gt;&lt;i&gt;Getdate&lt;/i&gt;&lt;/font&gt;&lt;font color = "maroon"&gt;(&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "maroon"&gt;)&lt;/font&gt;&lt;font color = "silver"&gt;;&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;font color = "blue"&gt;END&lt;/font&gt;&lt;br /&gt;&lt;br/&gt;&lt;br /&gt;&lt;br/&gt;&lt;font color = "blue"&gt;GO&lt;/font&gt;&amp;nbsp;&lt;br /&gt;&lt;/font&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-8668448886561671127?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/8668448886561671127/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=8668448886561671127' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/8668448886561671127'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/8668448886561671127'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2011/08/stored-procedure-for-importing-data.html' title='Stored procedure for importing data from Oracle to Sql Server'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-7163965045291542972</id><published>2011-07-11T22:32:00.000-07:00</published><updated>2011-07-11T22:35:48.027-07:00</updated><title type='text'>Blood from a stone, or, JSON from ASMX Web Service</title><content type='html'>Just a quick note for posterity.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If you've got an older ASP.NET website that you're just now trying to graft JSON Web Services into, and can only get XML out of it no matter how hard you try, there's a whole stack of stuff that needs to go into the web.config file.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The easiest way to get it into yours is to create a new web-site (just a file-system based one) and snip all the missing sections out of there.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-7163965045291542972?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/7163965045291542972/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=7163965045291542972' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/7163965045291542972'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/7163965045291542972'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2011/07/blood-from-stone-or-json-from-asmx-web.html' title='Blood from a stone, or, JSON from ASMX Web Service'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-4608610899171312283</id><published>2011-06-08T02:50:00.001-07:00</published><updated>2011-06-08T03:34:16.847-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Windows Phone'/><title type='text'>Windows Phone 7 - It's biggest problems are it's little ones</title><content type='html'>&lt;p&gt; &lt;/p&gt; &lt;p&gt;I've been living with the Windows Phone for a while now and I've watched a lot of the discussion about the phone's shortcomings yet it's the little things that no-one talks about that really prevent me from really enjoying the device.&lt;/p&gt; &lt;h2&gt;When you Live outside Australia&lt;/h2&gt; &lt;p&gt;Microsoft have always professed that Copy-Paste is coming, but that you don't really need it anyway, as browser recognises phone numbers and addresses and makes them clickable so that you don't have to copy these into the phone or maps app…&lt;/p&gt; &lt;blockquote&gt; &lt;p&gt;…unless you live outside the USA &lt;/p&gt; &lt;p&gt;…which a lot of us do.&lt;/p&gt;&lt;/blockquote&gt; &lt;p&gt;&lt;br /&gt;And that's the point really. Unless you live in the US you don't get the premium Windows Phone experience. Andrew Birch took the time to make up a table which shows the tattered mess of services and feature around the world &lt;a href="http://andrewtechhelp.com/andrews-tech-opinions/115-windows-phone-7-feature-availability-matrix"&gt;http://andrewtechhelp.com/andrews-tech-opinions/115-windows-phone-7-feature-availability-matrix&lt;/a&gt;&lt;/p&gt; &lt;p&gt;&lt;br /&gt;For example in Australia we can buy Apps (subject to regional pricing, lets not go there). There's no music, especially the awesome Zune-pass. You can't rent TV shows, but you can purchase and rent movies. The pattern is different for each country.&lt;/p&gt; &lt;p&gt;&lt;br /&gt;&lt;a href="https://picasaweb.google.com/lh/photo/EPcjpPqJF6syr4l965Ud_xuRdC4WhgazFFUpYYiioHc?feat=directlink"&gt;&lt;img style="margin: 3px 3px 3px 0px; display: inline; float: left" align="left" src="https://lh3.googleusercontent.com/-fg3cNPUyWAw/Te9AcPU_5lI/AAAAAAAAFeU/hcQKcZxctB4/s288/DSC_6090.JPG" /&gt;&lt;/a&gt;The story continues across the phone. Only the US has Bing Voice Search and Bing Traffic, only the US and UK have Bing Local Search (though both Local search and Voice search work if you perform locale gymnastics &lt;a href="http://www.istartedsomething.com/20101021/workaround-local-listings-voice-search-wp7-australia/)"&gt;http://www.istartedsomething.com/20101021/workaround-local-listings-voice-search-wp7-australia/)&lt;/a&gt; The USA is also the only country to have clickable phone numbers and addresses.&lt;/p&gt; &lt;p&gt;&lt;br /&gt;In the online world, people who don't live in America are used to getting left out (Amazon music, Netflix or Hulu for example) so it's already a sore spot. But turning off local search when the listings are obviously there just rubs salt in the wound. And as a side note, because of the 'clever' stuff Bing does with tie-in's to all sorts of services, it doesn't work nearly as well when you aren't in the USA, and you can't change the default search engine.&lt;/p&gt; &lt;h2&gt;Hubs&lt;/h2&gt; &lt;p&gt;&lt;a href="https://picasaweb.google.com/lh/photo/Au-EVYrVUD6do2m6zgNf7xuRdC4WhgazFFUpYYiioHc?feat=directlink"&gt;&lt;img style="display: inline; float: right" align="right" src="https://lh4.googleusercontent.com/-VdVQzPOtIuY/Te9K4ODQb9I/AAAAAAAAFe8/7ELtScQZexE/s288/DSC_6119.JPG" /&gt;&lt;/a&gt;Hubs just don't live up to the promise. They're designed to stop the in-and-out of other phones, aggregating all your 'stuff' into task centric areas. So there's a photo hub which has all my photos. And it has my photos loaded from Zune, and those taken on the phone, and can integrate Flickr and I think one of the windows cloud services. But there is no Picasa integration, and that's where I keep my online albums, along with a few quadrillion other people. I remembered the rhetoric in the publicity about hubs being dynamic and modular and wonderful, so being a good windows programmer I thought "I'll write the hub add-in myself" The google API's are good but I searched the Windows Phone documentation and discovered that there is no ability for third party apps to integrate seamlessly into those hubs. Sorry to break it to you MS, without extensibility its not a hub, it's a photo app, and frankly I've seen better photo apps on iPhone.&lt;/p&gt; &lt;h2&gt;Volume&lt;/h2&gt; &lt;p&gt;&lt;a href="https://picasaweb.google.com/lh/photo/t2Uo3RsA3g6cXU0JzJ8SlhuRdC4WhgazFFUpYYiioHc?feat=directlink"&gt;&lt;img style="margin: 0px 3px 0px 0px; display: inline; float: left" align="left" src="https://lh3.googleusercontent.com/-MH_hE3sU9bM/Te9K3qHdYrI/AAAAAAAAFe4/D3gyi7uVgjs/s288/DSC_6115.JPG" /&gt;&lt;/a&gt;Volume management is very rudimentary. It's totally non-contextual. When you start a noisy game and turn the volume down it stays down, and I miss the next couple of phone calls. Even more inexcusably if I plug in my headphones start some music I'll turn the volume down to save my poor eardrums. When I finish listening and pull the headphones out, the volume stays at the headphone volume, and I miss the next couple of calls. The keyboard is really loud. I can't type a full message without my cubicle-colleagues shooting angry looks so I have to mute the volume and occasionally forget to un-mute, and I miss the next couple of calls. I could turn key press sounds off altogether, but I just want it quieter, by a fair bit.&lt;/p&gt; &lt;h2&gt;Clocks&lt;/h2&gt; &lt;p&gt;Upon release the phone had no timers, stopwatches or world clocks, a few weeks after release some Microsoft first party apps appeared on the store to add these features, but they're separate apps. They are pretty but have inconsistent UI's, they generally sit over on the loooong apps list, and provide a more in-and-out experience than you'd find on... say, iPhone.&lt;/p&gt; &lt;h2&gt;FM Radio&lt;/h2&gt; &lt;p&gt;I like being able to listen to FM radio, I don't commute on public transport anymore, so I can dig all the ABC Radio National I need on my car stereo, but I would like this feature. I can bookmark radio stations so that I don't always have to remember the frequency and dial them up except... I do. Because I can't actually name a bookmarked station.&lt;/p&gt; &lt;h2&gt;Data Counters&lt;/h2&gt; &lt;p&gt;I haven't found any. Only way to know if you're usage is crazy (for example, if you have a Yahoo email account and it's churning through data like crazy) is when you get the bill at the end of the month. Given the nature of mobile data plans it may be a very large bill.&lt;/p&gt; &lt;h2&gt;Personalisation&lt;/h2&gt; &lt;p&gt;&lt;a href="https://picasaweb.google.com/Tim.Pip.and.Mackenzie/20110608StoryPhotos?authkey=Gv1sRgCLqvne2Yx4b-ugE#5615778132630396290"&gt;&lt;img style="display: inline; float: right" align="right" src="https://lh4.googleusercontent.com/-UZPrypbbCjQ/Te9AdTzXXYI/AAAAAAAAFeg/FeOvToyEx3k/s144/DSC_6097.JPG" /&gt;&lt;/a&gt;I can move the tiles around a bit, but I've only got a couple of colours to choose from. And I don't really like any of them. Who would it hurt to allow the use of whatever colour I like. It's my own fault if I choose Poo Brown, actually I think Poo Brown is one of the ten colours.&lt;/p&gt; &lt;p&gt;Ringtones. A smartphone without custom ringtones. Really ?&lt;br /&gt;The supplied tones (ring - message - alarm) are all roughly the &lt;a href="https://picasaweb.google.com/lh/photo/twKj5y0UW6-6sGewD1_jSRuRdC4WhgazFFUpYYiioHc?feat=directlink"&gt;&lt;img style="margin: 0px 3px 0px 0px; display: inline; float: left" align="left" src="https://lh6.googleusercontent.com/-5PvDPN-mmx8/Te9AeEwOwsI/AAAAAAAAFeo/-ZBFK0-jFDA/s144/DSC_6100.JPG" /&gt;&lt;/a&gt;same 'theme'. I'm not sure about android, but the iPhone provides a good collection of distinctive ringtones (which you then hear every-where due to the sheer number of the things around)&lt;/p&gt; &lt;h2&gt;The Bucket list&lt;/h2&gt; &lt;p&gt;&lt;a href="https://lh4.googleusercontent.com/-DOFV_MpkSAI/Te9K3KDQQaI/AAAAAAAAFe0/QZAP-jKBHh4/s144/DSC_6109.JPG"&gt;&lt;img style="display: inline; float: right" align="right" src="https://lh4.googleusercontent.com/-DOFV_MpkSAI/Te9K3KDQQaI/AAAAAAAAFe0/QZAP-jKBHh4/s144/DSC_6109.JPG" /&gt;&lt;/a&gt;The home screen is genuinely an attempt to do things a little differently, but real-estate is at a premium and only a few things can fit on there. Everything else goes onto an alphabetical list on the next screen, and it gets very long and ungainly and most of the icons are in your theme colour.&lt;/p&gt; &lt;h2&gt;A touch of Flair&lt;/h2&gt; &lt;p&gt;Microsoft has some good graphics people. People love the Bing backgrounds, and that make it onto the phone (though I've come to use the google search app), the Zune app is quite pretty, and when the stars align and you see one of those lovely large artist photo's in the background it's a nice experience, and the Panorama controls in the 'hubs' look great.&lt;/p&gt; &lt;p&gt;&lt;a href="https://picasaweb.google.com/lh/photo/Au-EVYrVUD6do2m6zgNf7xuRdC4WhgazFFUpYYiioHc?feat=directlink"&gt;&lt;img style="display: inline; float: right" align="right" src="https://lh4.googleusercontent.com/-VdVQzPOtIuY/Te9K4ODQb9I/AAAAAAAAFe8/7ELtScQZexE/s288/DSC_6119.JPG" /&gt;&lt;/a&gt;Photos Hub is where your personal flair is really supposed to come into it's own, I do get the background picture but there appears to be some kind of Bayesian intelligence ensuring that with all the awesome photos on my phone it only ever chooses the most boring. I'd love to point it at a folder and say 'there, I've got some pretty pictures in there choose from that lot', but that's not an option.&lt;/p&gt; &lt;p&gt;People tiles on the home screen are great. I call and text my wife a lot and not having to find her on the list each time is good. (There is some kind of cognitive dissonance here as I still find myself going into the list half the time, I'm a programmer and gamer and a geek first class, so I should be able to adapt). But with the funky animation on the tiles, the persons name is only displayed half the time. The rest of the time it uses the contact picture, which is updated from one of the integrated online services like hotmail or facebook (and I love how it grabs contact details and piccies from facebook). However when the contact behind one of those smart tiles changes their profile picture to their cat, or child's painting, or Master Chief you have to scroll, stop, wait for the live tile to reveal a name, repeat.&lt;/p&gt; &lt;h2&gt;Updates&lt;/h2&gt; &lt;p&gt;Feb update in April, The update that was supposed to be in December became the March update which I got in May. they promise lots of goodies in mango, but I just think "When will I acutally see Mango"&lt;/p&gt; &lt;h2&gt;API's&lt;/h2&gt; &lt;p&gt;There are no apps that use the camera for cool stuff like augmented reality or bar-code scanners because there are no API's to access the camera, or the gyro's. Apps like Skype cannot work because programmers can't use sockets (raw network communication). Many of these things are slated for Mango, but that’s quite a wait.&lt;/p&gt; &lt;h2&gt;Calendars&lt;/h2&gt; &lt;p&gt;I can still only link one, I have a personal calendar a work calendar and a calendar I share with my wife. When Apple got Google calendar sync working well this was an awesome and well implemented feature.&lt;/p&gt; &lt;h2&gt;And On&lt;/h2&gt; &lt;p&gt;I could go on (and on). Windows Phone is a novelty to most people, so I'm often asked what it's like and I that's a question I can't answer without qualification. Using the thing day-to-day it's fine, the phone works well enough it's not as well designed in many ways as an iPhone, but it's biggest problem are it's little ones. There are so many little rough edges that need polishing, and they not only haven't been polished, they're not even in the language for the Mango release.&lt;/p&gt; &lt;p&gt;When I got an iPhone 3G there where rough edges but once every two or three works an update would appear (a great big ungainly update with ambiguous or non-existent patch notes) I knew that the rough edges where getting looked at and improved. 6 months later I had a phone where a lot of the niggles where gone, 12 months later it was a very polished experience. In comparison, 6 months into owning a windows phone I was wondering why I couldn't get the only released update for my phone, and why there where some new features, but no polish on the old ones.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-4608610899171312283?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/4608610899171312283/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=4608610899171312283' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/4608610899171312283'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/4608610899171312283'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2011/06/windows-phone-7-it-biggest-problems-are.html' title='Windows Phone 7 - It&amp;#39;s biggest problems are it&amp;#39;s little ones'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh3.googleusercontent.com/-fg3cNPUyWAw/Te9AcPU_5lI/AAAAAAAAFeU/hcQKcZxctB4/s72-c/DSC_6090.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-7099021124873479733</id><published>2011-03-04T17:53:00.000-08:00</published><updated>2011-10-13T17:12:37.797-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Honours'/><title type='text'>Lets play with Robots Instead</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-STsxCSOP8H4/Tpd8hMQ09rI/AAAAAAAAADk/B07hAhx_ehI/s1600/wall-e.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-STsxCSOP8H4/Tpd8hMQ09rI/AAAAAAAAADk/B07hAhx_ehI/s200/wall-e.png" width="188" /&gt;&lt;/a&gt;&lt;/div&gt;I had a constructive talk to Dr A again today. I related to him my&amp;nbsp;disappointment&amp;nbsp;regarding finding an appropriate honours topic in the DW/DM space. And came around to talking about my enthusiasm for all things Robotics. Which was fortunate as he's one of the coordinators for the (previously unknown to me) Newcrest Mining Research Laboratory, where they currently have students undertaking PhD's in Ground Penetrating Radar, Machine Learning approaches to Robot navigation and Image Segmentation algorithms.&lt;br /&gt;&lt;br /&gt;Taking a good couple of seconds to think about it, I abandoned all thoughts of a dry, wordy honours project on the use of strategic information in a modern corporation and decided to play with Robots. :)&lt;br /&gt;&lt;br /&gt;Dr A has directed me to Feng Lu who is working with the Robots in the lab, hopefully talking to him will give me some ideas on where I can help.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-7099021124873479733?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/7099021124873479733/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=7099021124873479733' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/7099021124873479733'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/7099021124873479733'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2011/03/lets-play-with-robots-instead.html' title='Lets play with Robots Instead'/><author><name>Tim S</name><uri>http://www.blogger.com/profile/02639023335038322301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-STsxCSOP8H4/Tpd8hMQ09rI/AAAAAAAAADk/B07hAhx_ehI/s72-c/wall-e.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-3786574147922815917</id><published>2010-11-23T17:34:00.000-08:00</published><updated>2011-10-13T16:53:13.225-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Honours'/><title type='text'>Searching for an Honours Topic</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-_utzeW_afyM/Tpd5wFSRfHI/AAAAAAAAADc/MmWIc67rpoI/s1600/dw.jpg" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-_utzeW_afyM/Tpd5wFSRfHI/AAAAAAAAADc/MmWIc67rpoI/s200/dw.jpg" width="189" /&gt;&lt;/a&gt;&lt;/div&gt;My day job is building Data Warehouses for the Universities strategic information. I have a degree of latitude in how I shape the Data Warehouse and figured that doing my research in Data Warehousing / Data Mining would be a good way to tie my work to my research. So I set about calling a number of the Academics who had DW / DM on their research interests and was left a little underwhelmed.&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: inherit;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Dr Zahid Islam spoke most authoritatively on the subject but is focused on a lower level than I am really interested in. If I where to perform Missing Value Imputation, or finding Data Clusters I would use one of the excellent and easy to use Microsoft Data Mining extensions for SSAS. I am more interested in new methods for ETL, methods for making the most of things that Computers can offer up in spades (Memory, Storage size) while living within other constraints (CPU, IO throughput). Ways to automatically adjust which attributes from a large set one should throw at the Data Mining algorithm, and better ways to integrate DW information into a large modern corporate institution.&lt;br /&gt;&lt;br /&gt;I have emailed someone who lists Corporate Information as a research interest, but have not heard back as yet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-3786574147922815917?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/3786574147922815917/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=3786574147922815917' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/3786574147922815917'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/3786574147922815917'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2010/11/searching-for-honours-topic.html' title='Searching for an Honours Topic'/><author><name>Tim S</name><uri>http://www.blogger.com/profile/02639023335038322301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-_utzeW_afyM/Tpd5wFSRfHI/AAAAAAAAADc/MmWIc67rpoI/s72-c/dw.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-2255764854170889063</id><published>2010-11-20T17:09:00.000-08:00</published><updated>2011-10-13T16:28:36.643-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Honours'/><title type='text'>Contemplating research</title><content type='html'>I've been planning on doing something more Academic for quite a while, assuming a topic would drop from the sky, like mana from...              well as an Atheist gamer I suppose I get mana from killing monsters, rather than heaven, and I haven't killed many actual monsters recently.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;In short, I've had a chat with some of the Academics and decided an Honours would be an appropriate sized chunk for me. I can do some research, slog through the paperwork and hopefully come out the other end with a few more letters I'll never remember to put after my name, and a feel for whether I can make it through a post-graduate research degree.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-2255764854170889063?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/2255764854170889063/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=2255764854170889063' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/2255764854170889063'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/2255764854170889063'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2010/11/contemplating-research.html' title='Contemplating research'/><author><name>Tim S</name><uri>http://www.blogger.com/profile/02639023335038322301</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-5143456249453222045</id><published>2010-09-12T16:07:00.000-07:00</published><updated>2010-09-12T16:12:57.946-07:00</updated><title type='text'>September 15th</title><content type='html'>I'm looking forward to two might-be-announcements on Sep 15th. &lt;a href="http://nikonrumors.com/"&gt;NikonRumours &lt;/a&gt;is suggesting that will be an announcement of the &lt;a href="http://nikonrumors.com/2010/09/06/recap-3.aspx"&gt;Nikon D7000 on Sep 15&lt;/a&gt; and other rumours suggest that a &lt;a href="http://www.facebook.com/event.php?eid=112503548806825"&gt;HTC public meetup&lt;/a&gt; will be the venue for announcing a new Windows Phone series 7 device, personally I'm hoping a HD2 replacement, variously rumored to be the &lt;a href="http://www.engadget.com/2010/09/01/htc-hd3-to-be-named-hd7-in-honor-of-windows-phone-7-launch-octo/"&gt;HD7&lt;/a&gt; will be announced.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-5143456249453222045?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/5143456249453222045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=5143456249453222045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/5143456249453222045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/5143456249453222045'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2010/09/september-15th.html' title='September 15th'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-3561670619838806411</id><published>2008-11-11T06:35:00.000-08:00</published><updated>2008-11-11T06:57:05.082-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quadcopter'/><title type='text'>The problem with electronics today</title><content type='html'>So I splashed out and purchased some of the hardware I need to get this show on the road. An MCU, a gyro (at $100/pop, I can buy the rest later) an accelerometer a brushless motor, and an ESC to drive it.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Being accustomed to software development, I am quite used to wierd little problems bloating even the simplest tasks out to more elephantine proportions. I was very surprised when this hardware that was supposed to keep me busy for months, just worked.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;It's due, by no means, to any electrical prowess on my behalf. I can rightly attribute this quick success to the arduino and it's well written libraries.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;When programming microcontrollers, I'm used to having to look up the hardware adress for a port, manually set the bitmask indicating the direction for all the pins on the port, make several mistakes with endian-ness and conversion between hex, decimal and binary, and then manually handle the shuffling of data in and out of the appropriate registers. And then once your code is right you've gotta put together the right combination of compilers, header and startup files, and cross your fingers that it all goes together like it should.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The Arduino in contrast makes all this stuff remarkable easy. If you want to interact with an I2C device (a form of two wire connection to other chips in the circuit) simply import the wire library and use the simple function calls, Voila, instant accelerometer. Want to read analog values from the gyro, hook it up and call AnalogueRead(pin_number). &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;I don't know if the ATMega will have the grunt for the final project (It should, it seems equivalent to the PIC from the mikrokopter and the AVR from the 1st gen uavp), and the ide is built for simplicity, it doesn't appear to handle multi file projects very well, if at all. But as a prototyping unit, it's almost like writing pseudocode. It's like childs play.&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Which is probably the point of the post. If you're interested in playing with microcontrollers, or need something to form the brains of a simple robotics project. You can't go far wrong getting hold of a recent Arduino.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The other point being, now I've gotta go and buy more expensive sensors, a long time before I thought I would have to.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-3561670619838806411?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/3561670619838806411/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=3561670619838806411' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/3561670619838806411'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/3561670619838806411'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/11/problem-with-electronics-today.html' title='The problem with electronics today'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-5693485845894838989</id><published>2008-11-03T17:40:00.000-08:00</published><updated>2008-11-05T18:57:21.490-08:00</updated><title type='text'>Gyro's and Linears and MCU's oh my!</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_VR58dznKdrE/SRJdCRSEFbI/AAAAAAAABNE/z_QwU0YJCYc/s1600-h/225px-Diecimilia.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5265373207929820594" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 140px" alt="" src="http://2.bp.blogspot.com/_VR58dznKdrE/SRJdCRSEFbI/AAAAAAAABNE/z_QwU0YJCYc/s200/225px-Diecimilia.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Gyroscopes&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Gyroscopes measure angular velocity, that is to say, how fast they are being rotated around their axis. The quadcopter needs three of these to measure rotation around the roll, pitch and yaw axes. The development of gyro's is an interesting story, probably best left to &lt;a href="http://en.wikipedia.org/wiki/Gyroscope"&gt;Wikipedia&lt;/a&gt;. The punchline is that once cumberous heavy spinning masses, gyros are now available in a small semi-conductor package using a tiny vibrating element to determine rotational forces.&lt;br /&gt;&lt;br /&gt;While gyroscopes do a good job of indicating very small rotations very quickly there is a problem. Gyroscopes don't indicate the difference between flat-level and the current position, nor even the angle rotated since the previous sample, they tell us the speed of rotation at a point in time. While this can be done very quickly, and velocity multiplied by time gives us distance (or angle) some factors limit the accuracy with which angle can be measured by a gyro over the long term&lt;br /&gt;&lt;br /&gt;a) the velocity is not static, sampling the velocity very fast will give a small error because the system was not rotating at the same speed for the whole sample period&lt;br /&gt;&lt;br /&gt;b) Gyro's have a limit of resolution, they may be able to tell you something is rotating at 0.458 rad/sec, but not 0.458793424957 rad/sec. In that example the reading will be out by 0.000793... rad/sec. While the effect of this is quite small for any particular reading when taking 300 readings a second, 18,000 a minute, small errors can add up.&lt;br /&gt;&lt;br /&gt;c) Gyro's in general have a degree of drift over time, and due to temperature variation.&lt;br /&gt;&lt;br /&gt;So gyroscopes drift over time. The quadcopter might fly perfectly for a little while then slowly start to tip and eventually flip over. Which brings us to&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Accelerometer&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Accelerometers measure the forces of acceleration acting on the meter. Used a lot in aircraft and racing to measure 'g-force' around corners and during acceleration and braking, also in the Wii-mote to great commercial success. While the standard use for an accelerometer is to measure, well acceleration, in autopilot type systems they have a very usefull property. Gravity always excerts a constant 9.8m/ss acceleration directly down. Accelerometers read this force like any other, and when the chip is relatively stationary does a great job of telling the system what angle they're at. In combination with gyroscopes you can make a pretty good approximation of which way the platform is leaning.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Wot' I Got&lt;/strong&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Looking around: the UAVP project, both &lt;a href="http://ng.uavp.ch/"&gt;new&lt;/a&gt; and &lt;a href="http://www.uavp.ch/"&gt;old&lt;/a&gt; use the &lt;a href="http://www.analog.com/en/mems-and-sensors/imems-gyroscopes/adxrs300/products/product.html"&gt;ADXRS300&lt;/a&gt; from Analog Devices. &lt;a href="http://www.mikrokopter.de/"&gt;Mikrokopter&lt;/a&gt; uses ENC-03J's from muRata. The other options around are the IDG-300 which seems like a great device as it provides two axes in one chip, however the UAVP people feel that it's has much worse accuracy than the ADXRS300. The final option MLX90609 from Melexis. It has a digital output, which is nice, but it's SPI, a 4 wire interface, and the accelerometers, and eventual motor speed controllers use I2C, a similar, but 2 wire protocol. If the MLX output in I2C it would probaby be a hands down winner as it looks to be in the ADXRS quality range, it's not, so I may as well go with something the UAVP people have experience with. The MLX also wasn't available from the &lt;a href="http://www.oceancontrols.com.au/"&gt;Australian Sparkfun distributor&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The Accelerometer was pretty easy. Both project use a LIS3L variant, and I simply chose the one I could easily obtain. 3 axis with I2C interface.&lt;br /&gt;&lt;br /&gt;I threw an Arduino Deicimila development board into the mix so I could experiment with the components, rather than spend all my time trying to wrestle with development environments and the microcontroller. The libraries that come with the Arduino are excellent. On a side note, if anyone has children keen on robotics or electronic hardware, I can heartily recommend the Arduino as a very cheap, yet extensible way to get involved with programming for microcontrollers.&lt;br /&gt;&lt;br /&gt;I ordered the Arduino, a LIS3LV02DQ (&lt;a href="http://www.nearfuturelaboratory.com/2006/09/22/arduino-and-the-lis3lv02dq-triple-axis-accelerometer/"&gt;article on interfacing with Arduino&lt;/a&gt;), a single ADXRS300 gyro from &lt;a href="http://www.oceancontrols.com.au/"&gt;Ocean Controls&lt;/a&gt; and waited.&lt;br /&gt;&lt;br /&gt;The gear arrived from Ocean Controls way faster than I was expecting. So I could start to play.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-5693485845894838989?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/5693485845894838989/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=5693485845894838989' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/5693485845894838989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/5693485845894838989'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/11/gyros-and-linears-and-mcus-oh-my.html' title='Gyro&apos;s and Linears and MCU&apos;s oh my!'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_VR58dznKdrE/SRJdCRSEFbI/AAAAAAAABNE/z_QwU0YJCYc/s72-c/225px-Diecimilia.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-976618626273684076</id><published>2008-11-03T14:51:00.001-08:00</published><updated>2008-11-03T16:29:30.577-08:00</updated><title type='text'>What's needed</title><content type='html'>&lt;a href="http://4.bp.blogspot.com/_VR58dznKdrE/SQ-Ww6FbrOI/AAAAAAAABJ0/pvXaoSAb5Go/s1600-h/00394-04-L_i_ma.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5264592256389328098" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 188px; CURSOR: hand; HEIGHT: 188px" alt="" src="http://4.bp.blogspot.com/_VR58dznKdrE/SQ-Ww6FbrOI/AAAAAAAABJ0/pvXaoSAb5Go/s200/00394-04-L_i_ma.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;While a sensible person might get hold of one of the excellent quadcopter platforms mentioned in the previous post, you don't learn a whole lot by starting halfway there.&lt;br /&gt;&lt;br /&gt;After a considerable amount of research (many others would consider it procrastination) I made my move and bought enough gear to start playing with some of the hardware required.&lt;br /&gt;&lt;br /&gt;The Quadcopter platform requires motion sensing. 3 axis of gyroscope and 3 axis of accelerometer are needed as a base. Extra sensors can be added to improve stability and functionality, commonly these are a compass for solid long-term yaw stability, a pressure sensor for altitude measurement, gps for position hold, come-home and flight mission tasks, along with a whole variety of other sensors for a variety of purposes.&lt;br /&gt;&lt;br /&gt;It requires motors, counter rotating propellers and brushless motor speed controllers for those motors. ...Times 4&lt;br /&gt;&lt;br /&gt;It requires a frame. there are some great looking frames out there, but most people end up using aluminium box section tubing initially.&lt;br /&gt;&lt;br /&gt;And finally it requires the brains to tie it all together. There are a whole variety of excellent microcontrollers easily available with development boards on the market. This wasn't so much the case untill recently, but the emergence of highly affordable microcontrollers and semiconductor devices has allowed the emergence of a healthy hobbyist community.&lt;br /&gt;&lt;br /&gt;I have decided to get hold of a microcontroller, a single gyro, and a chip which contains all three axis of accelerometer. This will allow me to exeriment with connecting these devices and providing telemetry back to a computer. But more on that in the next post.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;span style="font-size:78%;color:#666666;"&gt;(Picture from Sparkfun, &lt;/span&gt;&lt;a href="http://www.sparkfun.com/commerce/product_info.php?products_id=395"&gt;&lt;span style="font-size:78%;color:#000099;"&gt;http://www.sparkfun.com/commerce/product_info.php?products_id=395&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:78%;color:#666666;"&gt;)&lt;/span&gt;&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-976618626273684076?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/976618626273684076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=976618626273684076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/976618626273684076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/976618626273684076'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/11/whats-needed.html' title='What&apos;s needed'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_VR58dznKdrE/SQ-Ww6FbrOI/AAAAAAAABJ0/pvXaoSAb5Go/s72-c/00394-04-L_i_ma.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-5248577273128557430</id><published>2008-10-31T01:21:00.000-07:00</published><updated>2008-11-03T17:33:12.125-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='quadcopter'/><title type='text'>Quadcopters</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_VR58dznKdrE/SQ-Y__9BWaI/AAAAAAAABKU/KWDmLzV3uYI/s1600-h/qcopter_amir.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5264594714685954466" style="FLOAT: right; MARGIN: 0px 0px 10px 10px; WIDTH: 200px; CURSOR: hand; HEIGHT: 190px" alt="" src="http://2.bp.blogspot.com/_VR58dznKdrE/SQ-Y__9BWaI/AAAAAAAABKU/KWDmLzV3uYI/s200/qcopter_amir.jpg" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;(&lt;a href="http://picasaweb.google.com/guindehi/UAVPWolferlDevelopment?authkey=3XwSIA0s3Nk#5131377610897913922"&gt;Picture from Amir&lt;/a&gt; - blog at &lt;a href="http://amir.ch/weblog/"&gt;http://amir.ch/weblog/&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Quadcopters are cool, geeky cool. If anything epitomises the opportunities created by cheap, powerfull computing it's the ability for hobbyists to launch these gangly looking things into the air and have them stay there on sheer computational grunt.&lt;br /&gt;&lt;br /&gt;Quadcopters are different to other RC aircraft like helicopters because the quadcopter is naturally unstable, without computer control any imbalance between the power of the motors would flip and crash the 'copter much more quickly than a person could respond.&lt;br /&gt;&lt;br /&gt;This inherent instability means that you need a sophisticated control system, and because the computer does most of the work they are very simple to fly. And given more smarts, fly themselves.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.uavp.ch/"&gt;http://www.uavp.ch/&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.mikrokopter.de/"&gt;http://www.mikrokopter.de/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-5248577273128557430?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/5248577273128557430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=5248577273128557430' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/5248577273128557430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/5248577273128557430'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/10/quadcopters.html' title='Quadcopters'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_VR58dznKdrE/SQ-Y__9BWaI/AAAAAAAABKU/KWDmLzV3uYI/s72-c/qcopter_amir.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-2012017348133729292</id><published>2008-06-29T18:19:00.000-07:00</published><updated>2008-06-29T21:58:48.579-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='Gadets'/><title type='text'>iPhone 3G, July 11</title><content type='html'>So the iPhone 3G was announced at WWDC and we're (Australia) getting it. The keynote was pretty impressive containing a great showcase of a wide variety of upcoming apps. I like the information-at-your-figertips aspect of the medical imaging app shown, but frankly I geek'ed out more over super monkeyball. For those that didn't see the demonstration, super monkeyball is a game in which you tilt the game world around to guide a monkey in a rolling ball through a series of puzzles, the clincher with the iPhone implementation being that to tilt the world, you tilt the iPhone.&lt;br /&gt;&lt;br /&gt;It certainly seems to be gunning for enterprise. It has a variety of collaboration features such as push email and active-sync. I didn't foresee that Apple would be gunning for some of RIM's Blackberry customers. It has been commented upon that Blackberries aren't all about the features but the flexibility of deployment in an 'Enterprise environment' encrypted storage, roles based activation of phone features etc. However alot of Blackberry users just like the ability to get email on the fly, and may find the large screen and streamlined user experience 'UX' quite compelling.&lt;br /&gt;&lt;br /&gt;Also in the firing line is the obvious contender, Windows mobile phones. The SDK, the app store (simplified commercialisation especially) and the huge installed userbase with a common platform make the iPhone an attractive development target. I think there will be a plethora of high quality apps developed for the platform (and of course no small amount of really horrible software aswell). Despite the great promise of iPhone development I am still conscious of a problem with the whole 'developing for the iPhone' deal. Though it is less a 'problem' per se' as it is the result of a conscious decision.&lt;br /&gt;&lt;br /&gt;Everyone who has ever had to reinstall a fresh version of window knows that the worst enemy of a smoothly running OS is a whole bunch of installed software, bad software that poo's all over the registry, puts files into bits of the OS it shouldn't, and doesn't uninstall itself properly. The same problems afflict Windows mobile phone, software you stick on there for a giggle slowly clogs up the poor little thing and reduces it's performance more and more, untill you drop it on the ground, it hard-resets, and after a resync, things are good again for a while.&lt;br /&gt;&lt;br /&gt;iPhone's app store gets around this by only letting you install decent software, vetted and proven to not wreak havoc and destruction. A great idea, except that you can bet some of the grooviest software probably wont be on there.&lt;br /&gt;&lt;br /&gt;An example would be software that lets you &lt;a href="http://www.lifehacker.com.au/tips/2007/11/30/use_your_iphones_internet_conn.html"&gt;tether your phone &lt;/a&gt;so you can use it as a modem for your laptop. Apple don't provide that feature on purpouse. It's easier to convince mobile carriers to offer large data cap plans / unlimited plans, when they know that you'll only be downloading songs and web-pages, and not 5GB Age of Conan install files. The amount of software that would be censored by Apple is probably small, but the fact is that unless you jailbreak your iPhone (another warranty-voiding kettle of fish altogether) Apple will be telling you exactly what you can and cannot put on your iPhone. It's called a walled garden, it's pretty and safe inside, but you're subject to the whims of an unapologetically commercial company.&lt;br /&gt;&lt;br /&gt;It also potentially makes in-house development of custom applications difficult, though I can't speak with more authority because the latest releases of the SDK need OSX 10.5 and I've only got 10.4 on the trusty G4.&lt;br /&gt;&lt;br /&gt;My final gripe of the day is price. Yes the iPhone is a premium piece of hardware, but lets face it, Steve made a pretty big thing out of price at the keynote. I find it difficult to swallow that the iPhone is 'cheap' when most of the plan details from around the world so far show that the monthly spend will be close to half the up-front cost. If the iPhone is more expensive than it was before, and your hiding the price in a subsidy paid through the term of the contract, that's okay, but you shouldn't then get up on stage and brag about how 'cheap' you've made the iPhone because you havn't. It's just a different kind of expensive. I wanna buy one outright for $600-$700, toss it on a $15 voice cap, and pay another $15-$20 for enough data that I'm not worried about doing a bit of web-browsing, email check and map searching. And while there are no details on Optus and Vodafone plans, I'm pretty sure there wont be one of those.&lt;br /&gt;&lt;br /&gt;I do actually like the thing. I'm considering making it my phone for the next 2 or 3 years. I like it's big, clear, relatively tough screen, it's fluid and responsive UI, and there fact there will be a programmable mobile device with a meaningfully large userbase. But I figure someone has to have a poke at it.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-2012017348133729292?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/2012017348133729292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=2012017348133729292' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/2012017348133729292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/2012017348133729292'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/06/iphone-3g-july-11.html' title='iPhone 3G, July 11'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-2547969888926556332</id><published>2008-05-06T21:36:00.001-07:00</published><updated>2008-05-12T20:00:05.830-07:00</updated><title type='text'>Animoto video</title><content type='html'>&lt;a href="http://www.animoto.com/"&gt;Animoto&lt;/a&gt; is a funky service that someone referred to on one of Leo Laporte's &lt;a href="http://www.twit.tv/"&gt;TWiT &lt;/a&gt;sites.&lt;br /&gt;&lt;br /&gt;It's pretty groovy, it makes pro looking slideshows from your piccies. It's simple too,   toss in 15 piccies and choose some music, either your own, or some surprisingly good options of theirs and it does the rest.&lt;br /&gt;&lt;br /&gt;There's a longer option you can make for $3, and it's billed through google checkout. Seems like a funky idea with a good business model&lt;br /&gt;&lt;br /&gt;&lt;script src="http://widgets.clearspring.com/o/46928cc51133af17/482131e04d3dcc51/46928cc5788deb29/69cb4484/widget.js" type="text/javascript"&gt;&lt;/script&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-2547969888926556332?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/2547969888926556332/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=2547969888926556332' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/2547969888926556332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/2547969888926556332'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/05/animoto-video.html' title='Animoto video'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-459093522502548351</id><published>2008-04-15T05:36:00.000-07:00</published><updated>2008-04-17T23:13:30.216-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iPhone'/><category scheme='http://www.blogger.com/atom/ns#' term='Gadets'/><title type='text'>iPhone - just add smart</title><content type='html'>&lt;a href="http://1.bp.blogspot.com/_VR58dznKdrE/SAg4ndrNP1I/AAAAAAAAAcg/0Q9F4002deo/s1600-h/iPhone.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5190460821176401746" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://1.bp.blogspot.com/_VR58dznKdrE/SAg4ndrNP1I/AAAAAAAAAcg/0Q9F4002deo/s200/iPhone.jpg" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;(image stolen from &lt;/span&gt;&lt;a href="http://www.apple.com/iphone/"&gt;&lt;span style="font-size:78%;"&gt;http://www.apple.com/iphone/&lt;/span&gt;&lt;/a&gt;&lt;span style="font-size:78%;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:78%;"&gt;&lt;/span&gt;&lt;br /&gt;It's good that there's a company that does things the way Apple does. I like nice design I like polished interfaces. I like when it's a good product like the Titanium / Aluminium Powerbook, like the mac-mini. I don't like when they try to make up for lack of features with marketing.&lt;br /&gt;&lt;br /&gt;The iPhone was marketed heavily as a smart-phone, more a competitor to PocketPC's than Nokia's and I told everyone I could that this was just garbage. Yes it was pretty but if you can't write custom apps for it it's not a smart-phone, it's not even a mildly-clever-phone.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:180%;"&gt;However&lt;/span&gt; (&lt;- that's a big however) now Apple has released the &lt;a href="http://developer.apple.com/iphone/program/"&gt;SDK&lt;/a&gt; and from a really high-level perusal it looks quite reasonable. Which means iPhone has gone from 'sit in the dunce corner pretty boy' to much more respectable piece of serious-geek-equipment. I'm not talking &lt;a href="http://www.twit.tv/"&gt;Leo Laporte&lt;/a&gt; geek here, I'm talking &lt;a href="http://www.pluralsight.com/blogs/dbox/"&gt;Don Box&lt;/a&gt; geek (I know he's a Microsoft guy, but I can only talk from my perspective).&lt;br /&gt;&lt;p&gt;It still feels like Apple want alot more involvement in your application development than, say Microsoft, Java or Symbian desire, there seems to be a little 'ET phone home' about their distribution process. I'll be interested to see if you can distribute apps without hosting them with Apple, but since you can now get &lt;a href="http://www.engadget.com/2007/05/30/itunes-plus-drm-free-music-now-official-er/"&gt;DRM free &lt;/a&gt;music from &lt;a href="http://www.apple.com/pr/library/2007/05/30itunesplus.html"&gt;iTunes&lt;/a&gt; I'll give it the benefit of the doubt&lt;br /&gt;&lt;/p&gt;This blog wasn't going when the iPhone came out, but just imagining it was, consider this a retraction. The iPhone is allowed to join the lunchtime chess-club. Let's just hope it can convince Windows Mobile to buy afew bits of &lt;a href="http://www.hugoboss.com/"&gt;Hugo Boss&lt;/a&gt; gear.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-459093522502548351?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/459093522502548351/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=459093522502548351' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/459093522502548351'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/459093522502548351'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/04/iphone-just-add-smart.html' title='iPhone - just add smart'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_VR58dznKdrE/SAg4ndrNP1I/AAAAAAAAAcg/0Q9F4002deo/s72-c/iPhone.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-9070238711745694371</id><published>2008-04-14T23:56:00.000-07:00</published><updated>2008-04-17T16:59:08.115-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='World of Warcraft'/><category scheme='http://www.blogger.com/atom/ns#' term='Games'/><title type='text'>Weekend of raiding success</title><content type='html'>&lt;a href="http://2.bp.blogspot.com/_VR58dznKdrE/SARkRtrNPwI/AAAAAAAAAb4/YA1toNf1qXI/s1600-h/uch_crossbow_1.jpg"&gt;&lt;img id="BLOGGER_PHOTO_ID_5189382926119026434" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; CURSOR: hand" alt="" src="http://2.bp.blogspot.com/_VR58dznKdrE/SARkRtrNPwI/AAAAAAAAAb4/YA1toNf1qXI/s320/uch_crossbow_1.jpg" border="0" /&gt;&lt;/a&gt; Saturday was raiding day and we got 25 people together.&lt;br /&gt;&lt;div&gt;We started by trying to repeat our success the previous week on Magtheridon. It's alot easier now that the elementals don't decimate our group before the main game even starts. Cube clicking is much easier now that you don't have to synchronise multiple groups and manage backup clickers on 5 cubes all while trying to avoid cave-ins and dish out damage. &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;We one-shotted Magtheridon and, drunk with our success moved onto &lt;a href="http://www.wowwiki.com/The_Lurker_Below"&gt;the Lurker Below&lt;/a&gt; (in Serpent Shrine Cavern). Despite half the group knowing how to deal with the fight, the rest of us flailed around like lost puppies. I spent most of one attempt just trying to get back up on my platform. Lurker Below: 3, us: 0. We'll try again later.&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Sunday:&lt;/div&gt;&lt;br /&gt;&lt;div&gt;Up into Karazhan for the 4th time. Big success we one-shotted every boss except Opera (how humiliating). This was the first time the guilds new Aussie run has taken down all the bosses, so we expect to be getting much faster now.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;I finally upgraded my Auction house special &lt;a href="http://www.wowhead.com/?item=31303"&gt;Valanos' Longbow&lt;/a&gt;. Kara wasn't kind enough to give me &lt;a href="http://www.wowhead.com/?item=28772"&gt;Sunfury&lt;/a&gt; or &lt;a href="http://www.wowhead.com/?item=28581"&gt;Wolfslayer&lt;/a&gt;, but the &lt;a href="http://www.wowhead.com/?item=28504"&gt;Steelhawk crossbow&lt;/a&gt; is good enough until I get 150 badges.&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;A succesfull weekends raiding.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-9070238711745694371?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/9070238711745694371/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=9070238711745694371' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/9070238711745694371'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/9070238711745694371'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/04/weekend-of-raiding-success.html' title='Weekend of raiding success'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_VR58dznKdrE/SARkRtrNPwI/AAAAAAAAAb4/YA1toNf1qXI/s72-c/uch_crossbow_1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-711563514187238336.post-1786360528989956059</id><published>2008-04-14T23:29:00.000-07:00</published><updated>2008-04-14T23:48:18.713-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='World of Warcraft'/><category scheme='http://www.blogger.com/atom/ns#' term='Games'/><title type='text'>That's some engineering for your gold</title><content type='html'>So I was wondering what it 'costs' to level the engineering profession in WoW. Sure, &lt;a href="http://www.lootables.com/"&gt;lootables&lt;/a&gt; will lay it all out there for you, but I'm not the type to studiously auction off everything I create to minimize the cost drain. So I got rid of all but 100 gold from my character, ported to Iron Forge and went at it.&lt;br /&gt;&lt;br /&gt;I followed Lootables suggestions where they made sense, but adjusted on the way. Some of the Lootables recipes are chosen they sell well on the AH. I didn't want to wait for stuff to sell so I vendored and trashed my way along.&lt;br /&gt;&lt;br /&gt;The answer is around 170-180, that's where you get to with 100G on Uther if you're lazy. I bought a set of &lt;a href="http://www.wowhead.com/?item=7148"&gt;goblin jumber cables&lt;/a&gt;  (7G out of the 100G total,   I didn't say this was scientific) just in time for a quick Heroic Shattered Halls half run where I got to use them, and they worked, and... no-one realised that the humble hunter had saved the day (or at least the run back from Honor Hold). Never mind, I'll soldier away on my skill untill I can use the &lt;a href="http://www.wowhead.com/?item=18587"&gt;Goblin Jumper Cable XL&lt;/a&gt; and I can save the day, and people will notice, and cheddar will rain from the sky.&lt;br /&gt;&lt;br /&gt;And next time I grace the shattered halls with my presence we will be taking one more &lt;a href="http://www.wowhead.com/?item=23819"&gt;toy&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/711563514187238336-1786360528989956059?l=spinlock.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://spinlock.blogspot.com/feeds/1786360528989956059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=711563514187238336&amp;postID=1786360528989956059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/1786360528989956059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/711563514187238336/posts/default/1786360528989956059'/><link rel='alternate' type='text/html' href='http://spinlock.blogspot.com/2008/04/thats-some-engineering-for-your-gold.html' title='That&apos;s some engineering for your gold'/><author><name>TJS</name><uri>http://www.blogger.com/profile/16422068325809114307</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
