<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>DBMSguy.com</title>
	<atom:link href="http://dbmsguy.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://dbmsguy.com/blog</link>
	<description>Practical advice for the practical DBA</description>
	<lastBuildDate>Wed, 01 Sep 2010 21:01:37 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Inline database shell scripts using awk</title>
		<link>http://dbmsguy.com/blog/?p=181</link>
		<comments>http://dbmsguy.com/blog/?p=181#comments</comments>
		<pubDate>Wed, 01 Sep 2010 21:01:37 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[scripts]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[db2]]></category>
		<category><![CDATA[dba]]></category>
		<category><![CDATA[dbmsguy]]></category>
		<category><![CDATA[korn]]></category>
		<category><![CDATA[paul mayhew]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=181</guid>
		<description><![CDATA[One of the things I find very powerful in my day to day work as a DBA, is the use of inline shell/awk scripts.  I use this technique when I need to do the same thing to many objects.  I often use it when I want something quick and dirty or create a base script [...]]]></description>
			<content:encoded><![CDATA[<p>One of the things I find very powerful in my day to day work as a DBA, is the use of inline shell/awk scripts.  I use this technique when I need to do the same thing to many objects.  I often use it when I want something quick and dirty or create a base script to work from.</p>
<p>An example might be when I want to do row counts on every table, or maybe set up a reorg on all the tables in a database.</p>
<p>Here is the command string you can use to do such a thing:</p>
<p><strong>db2 connect to sample</strong></p>
<p><strong>db2 -x &#8220;select tabschema, tabname from syscat.tables where tabschema=&#8217;DB2INST1&#8242; and type=&#8217;T'&#8221; | awk &#8216;BEGIN{print &#8220;db2 connect to sample&#8221;} {print &#8220;db2 -v \&#8221; select count(*) from &#8220;$1&#8243;.&#8221;$2&#8243;\&#8221;"}&#8217; | ksh</strong></p>
<p>The above inline script will select all the tables and return tablenames, then piping that into awk, we first print a connect statement and then print all the count statements.  All of this is then piped into a ksh.  The connect must be put there because a new instance of ksh is generated.</p>
<p>The base query can, of course, be customize to whatever suits your needs.</p>
<p>The pipe in to ksh is optional as you could just direct it to an output file and use it later and or make further modifications.</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=181</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>db2 batch scripts &#8211; tips and tricks &#8211; part 2</title>
		<link>http://dbmsguy.com/blog/?p=155</link>
		<comments>http://dbmsguy.com/blog/?p=155#comments</comments>
		<pubDate>Mon, 30 Aug 2010 00:18:42 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[db2]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=155</guid>
		<description><![CDATA[I&#8217;ve always been a little frustrated with db2 when running scripts and command lines with fact that when a command would run like insert, update or delete, you never knew how many rows you affected.  Some GUI products will tell you, but with command line it would just come back as being successful (or not) and it [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been a little frustrated with db2 when running scripts and command lines with fact that when a command would run like insert, update or delete, you never knew how many rows you affected.  Some GUI products will tell you, but with command line it would just come back as being successful (or not) and it was up to you to validate what you really did with a subsequent query.</p>
<p>Being a DBA, I always feel the need to validate what I do especially with ad hoc statements to ensure that I have done what I expected.</p>
<p>Enter the <strong>m </strong>option on the db2 command line.  This is a relatively new switch that will cause db2 to return to you how many rows were affected. The m option was introduced with verison 9.</p>
<p>To do this from the command line:</p>
<p><strong>db2 -m &#8220;delete from test&#8221;</strong> will return</p>
<p><strong>  Number of rows affected : 18<br />
DB20000I  The SQL command completed sucessfully.</strong></p>
<p>To do this from a script:</p>
<p><strong>db2 -tvmf test.db2</strong></p>
<p>By doing this, you will have the number of rows affected at your finger tips, not more hoping or assuming or doing count before/count after!</p>
<p>Happy DBAing</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=155</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>db2 batch scripts &#8211; tips and tricks &#8211; part 1</title>
		<link>http://dbmsguy.com/blog/?p=148</link>
		<comments>http://dbmsguy.com/blog/?p=148#comments</comments>
		<pubDate>Fri, 30 Jul 2010 14:18:15 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[db2]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Misc]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=148</guid>
		<description><![CDATA[There are a lot of things you can do with db2 batch scripts that can make your life easy.  In this set of posts I will talk about just a few things that might make your life easier.  -s switch- I find the -s switch the handiest of all.  This will allow you to stop [...]]]></description>
			<content:encoded><![CDATA[<p>There are a lot of things you can do with db2 batch scripts that can make your life easy.  In this set of posts I will talk about just a few things that might make your life easier.</p>
<p><span id="more-148"></span><strong> -s switch</strong>- I find the -s switch the handiest of all.  This will allow you to stop the script execution if there is an error in the script. To do this execute your scripts with &#8220;db2 -stvf filename&#8221;.  By doing this, you will ensure the successful execution of your script.  If the script encounters an error, it will just stop at that point.  Checking becomes a little easier because you need only go to the bottom of the script for basic checking.</p>
<p>One additional trick &#8211; you can turn off the -s off and on in the script stream.  This allows you to disable checking for certain parts of your script you might expect to fail.  Things such as dropping a table that might or might not exist.  To do this your script would look like this:</p>
<p>update table &#8230;&#8230;;<br />
<strong>update command options using s off;<br />
</strong>drop table test.table;<br />
<strong>update command options using s on;</strong><br />
update table &#8230;&#8230;;</p>
<p>you would then execute with db2 -stvf filename</p>
<p>I guess of course you could just leave out the -s and use the &#8220;update command options&#8221; at the top of the script to turn it on, but I usually don&#8217;t do that because I want it on more than off.</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=148</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 &#8212; First Impressions</title>
		<link>http://dbmsguy.com/blog/?p=138</link>
		<comments>http://dbmsguy.com/blog/?p=138#comments</comments>
		<pubDate>Thu, 14 Jan 2010 18:43:57 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=138</guid>
		<description><![CDATA[A long time XP user, I was very nervous about getting a new system with windows 7.  Would anything work?  Would it be slower?  All kinds of things ran through my head.  I read all the reviews and for the most part, it seemed like a sucessful release, but then?&#8230;&#8230;.. I finally bought a new [...]]]></description>
			<content:encoded><![CDATA[<p>A long time XP user, I was very nervous about getting a new system with windows 7.  Would anything work?  Would it be slower?  All kinds of things ran through my head.  I read all the reviews and for the most part, it seemed like a sucessful release, but then?&#8230;&#8230;..</p>
<p><span id="more-138"></span></p>
<p>I finally bought a new system which had Windows 7&#8230;. I got myself a HP P6240F with</p>
<ul>
<li>8 Gb of memory &#8212; can&#8217;t have too much memory can you?</li>
<li>Intel Q8300 quad core 2.5 GHz</li>
<li>Windows 7 &#8211; 64bit</li>
<li>5200 rpm, 750Gb SATA hard drive</li>
</ul>
<p>I&#8217;m no gamer, so the graphics is no biggy for me, pretty much us it for business.  I do us DB2, so the extra memory will come in handy.</p>
<p>This is a replacement system, not an upgrade, so I didn&#8217;t have to worry about data much as it still resides on the old system.  Same with my applications, if it didn&#8217;t work on W7, then I could always leave it.</p>
<p><strong>First Impressions -</strong>Happy, I think.  Got the system home, plugged it in and it went through a little setup process to install Windows 7.  HP seems to do it nicely, although there are some minor annoyances like bloatware type stuff.  It&#8217;s fast, but nothing is installed, so no big surprise there.  The &#8216;areo&#8217; stuff is kinda kool.</p>
<p><strong>Installing my software &#8211; </strong>Next step is to install all of my varous software.  Here is where the problems start.  My printer is fairly new &#8211; HP C6380 and that auto installed fine.</p>
<p>One of the things about Windows 7 is that it does not come with a mail client.  No more outlook express.  At first I could not find my windows office 2003 disk, so I installed my old office 2000 apps.  Outlook did not work from office 2000.  I tried a few others &#8211; Thunderbird and Windows live mail.  Didn&#8217;t like the very much but they worked fine.  I finally found my windows office 2003 and installed that and outlook was fine.</p>
<p>My biggest problem was with my video/photo editing software.<br />
-Ulead Video Studio would not even install.  That was disappointing as I really like it.<br />
-Photo Exposion Deluxe 3 does not work very well either.  You can install it, but it has problems finding libraries, so in the end does not work.</p>
<p>Those are the two most notable.</p>
<p>My other problem was my accounting software (MYOB 11) does not work as well.  Had to leave that installed on XP.  Pretty small annoyance, but notable if you do not have a backup system.</p>
<p>My other big problem is that my backup software does not work.  Acronis True Image Home works somewhat, but hangs when I am doing backups&#8230; it has been relegated to the useless pile now.  The restore function seems to work ok, but there are occasional corruptions.</p>
<p>Sometimes my printer gets &#8216;forgotten&#8217; &#8212; I go to print something and the printer is gone.  Only way to get it back is to reboot.  An annoyance, but not that big a deal &#8211; it doesn&#8217;t happen that often.</p>
<p>I have not had any problems with bluescreen crashes or freezing issues.  It has run nicely since I got it.  With all my software installed I run at about 1.5 Gb in use minimum.  Goes up from there, so my advice is to get at least 4Gb of memory &#8211; stay away from those 2Gb bargan machines.</p>
<p><strong>Last Impressions &#8211; </strong>In the end, I&#8217;m pretty hapy with my new Windows 7 machine.  I like that it is 64Bit as that is the way of the new world.  As more software is upgraded to 64bit, I&#8217;ll be better positioned to take advantage of it.  The boot/shutdown times are good.  Boots up much quicker than XP as well as recovery from sleep.  Other than the photo/video software problems, I think I&#8217;ll be happy with my investment.</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=138</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting records based on the first and last days of a month</title>
		<link>http://dbmsguy.com/blog/?p=132</link>
		<comments>http://dbmsguy.com/blog/?p=132#comments</comments>
		<pubDate>Thu, 17 Dec 2009 21:06:50 +0000</pubDate>
		<dc:creator>Ivan Beg</dc:creator>
				<category><![CDATA[db2]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[DATE]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[Timestamp]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=132</guid>
		<description><![CDATA[Have you ever had a situation where you needed to select rows from a table for a specific month?   This example demonstrates how to retrieve all of the records belonging to the previous month by setting the first and last days in the WHERE clause of a SELECT statement.   But with some tweaking, you can [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever had a situation where you needed to select rows from a table for a specific month?   This example demonstrates how to retrieve all of the records belonging to the previous month by setting the first and last days in the WHERE clause of a SELECT statement.   But with some tweaking, you can make this query retrieve data from any month you wish.</p>
<p><span id="more-132"></span></p>
<p>For this example, we&#8217;ll assume that we have a table in a data warehouse called DW.TRANSACTION with two columns (TRANSACTION_ID and EFFECTIVE_TS) that is populated and up to date.</p>
<p>To retrieve the previous month&#8217;s records, we would create a query of the form:</p>
<blockquote>
<pre>SELECT
       TRANSACTION_ID
      ,EFFECTIVE_TS
FROM
       DW.TRANSACTION
WHERE
       EFFECTIVE_TS &gt;= TIMESTAMP_ISO(DATE(CURRENT DATE) - (DAY(CURRENT DATE)-1) DAYS - 1 MONTH)
AND    EFFECTIVE_TS &lt;= TIMESTAMP_ISO(DATE(CURRENT DATE) - (DAY(CURRENT DATE)-1) DAYS) - 1 MICROSECOND
;</pre>
</blockquote>
<p>If you would like to retrieve data from two months ago, the WHERE clause would be changed to:</p>
<blockquote>
<pre>       EFFECTIVE_TS &gt;= TIMESTAMP_ISO(DATE(CURRENT DATE) - (DAY(CURRENT DATE)-1) DAYS - 2 MONTHS)
AND    EFFECTIVE_TS &lt;= TIMESTAMP_ISO(DATE(CURRENT DATE) - (DAY(CURRENT DATE)-1) DAYS - 1 MONTH) - 1 MICROSECOND</pre>
</blockquote>
<p>At this point, you can keep increasing the values for the MONTHS to keep going into the past.</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=132</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DB2 HADR for dummies &#8211; Part 3</title>
		<link>http://dbmsguy.com/blog/?p=124</link>
		<comments>http://dbmsguy.com/blog/?p=124#comments</comments>
		<pubDate>Wed, 16 Dec 2009 19:47:47 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[db2]]></category>
		<category><![CDATA[hadr]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=124</guid>
		<description><![CDATA[This is the last post about HADR, I think I covered most of the basics of HADR finishing off with how it switches primary and standby.  What I have gone over is the basics of HADR.  There are many other topics within HADR.  One important thing to remember is to NEVER do unlogged operations (careful [...]]]></description>
			<content:encoded><![CDATA[<p>This is the last post about HADR, I think I covered most of the basics of HADR finishing off with how it switches primary and standby.  What I have gone over is the basics of HADR.  There are many other topics within HADR.  One important thing to remember is to NEVER do unlogged operations (careful with the load command).  Not only will it &#8216;break&#8217; HADR standby, but it will not tell you &#8212; you&#8217;ll not find out until you switch over to the standby to find it unusable.  I believe that in version 9.7, we are being allowed access to the standby.  This will allow you to validate the usability of the standby as well as other things like reporting.</p>
<p><span id="more-124"></span></p>
<p>This entry is about how to use HADR.  Once again, just the basics.</p>
<p>The command to switch the primary/standby pair is:</p>
<p>from the standby database:<br />
<strong>db2 takeover hadr on database sample</strong></p>
<p>simple as that, the standby is now the primary and the old primary is now the standby.</p>
<p>There is also a feature &#8211; ACR (automatic client re-route) which can automatically automatically re-route your client to the new primary database when it can not access the current primary.</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=124</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DB2 HADR for dummies &#8211; Part 2</title>
		<link>http://dbmsguy.com/blog/?p=91</link>
		<comments>http://dbmsguy.com/blog/?p=91#comments</comments>
		<pubDate>Thu, 26 Nov 2009 22:54:06 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[db2]]></category>
		<category><![CDATA[hadr]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=91</guid>
		<description><![CDATA[Okay, so here we go &#8230;. setting up an hadr environment&#8230;.  HADR in it&#8217;s lowest form is very straight forward to set up.  Here are the steps to start HADR You need to have either a second machine with DB2 installed, or alternately you can use a second instance.  I&#8217;m sure I don&#8217;t have to [...]]]></description>
			<content:encoded><![CDATA[<p>Okay, so here we go &#8230;. setting up an hadr environment&#8230;.  HADR in it&#8217;s lowest form is very straight forward to set up.  Here are the steps to start HADR</p>
<p><span id="more-91"></span></p>
<ol>
<li>You need to have either a second machine with DB2 installed, or alternately you can use a second instance.  I&#8217;m sure I don&#8217;t have to tell you that using a second instance of DB2 on the same machine defeats the whole purpose of this, but it is fine for testing</li>
<li>Make sure you have Log Retain set on either explicitly or implicitly</li>
<li>Make sure you have db cfg <strong>LOGINDEXBUILD</strong> set to On<br />
you need to set the following db config parameters &#8211;<br />
<strong>HADR_LOCAL_HOST</strong> set to the IP address or host name of the local host<br />
<strong>HADR_LOCAL_SVC</strong> set to the port you are going to assign<br />
<strong>HADR_REMOTE_HOST</strong> set to the IP address of standby instance &#8211; same as LOCAL if using an alternate instance<br />
<strong>HADR_REMOTE_SVC</strong> set to the standby port should be at least LOCAL +2<br />
<strong>HADR_REMOTE_INST</strong> set to standby instance name</li>
<li>Make a backup of your database &#8211; can be either online or offline</li>
<li>Send the backup to the standby machine.  If you are using two instances, then you can skip this</li>
<li>restore from the backup on the standby instance  &#8212; I&#8217;m assuming you are using the IBM SAMPLE database for this excerise.</li>
<li>On the standby database, you need to set the same db config values except you need to flip them around so they are correct &#8211; LOCAL values become REMOTE values.</li>
<li>On the standby machine/instance &#8220;db2 start hadr on database sample as standby&#8221;</li>
<li>On the primary machine/instance &#8220;db2 start hadr on database sample as primary&#8221;</li>
<li>Check if HADR is working &#8211; Do &#8220;db2 get snapshot for database on sample&#8221; &#8212; in the output look for:<br />
<strong>HADR Status<br />
  Role                   = Primary<br />
  State                  = Peer<br />
  Synchronization mode   = Nearsync<br />
  Connection status      = Connected , 11/26/2009 17:47:40.447523<br />
  Heartbeats missed      = 0<br />
  Local host             = 192.168.0.105<br />
  Local service          = 10000<br />
  Remote host            = 192.168.0.101<br />
  Remote service         = 11000<br />
  Remote instance        = DB2<br />
  timeout(seconds)       = 120<br />
  Primary log position(file, page, LSN) = S0000036.LOG, 0, 000000000B3B0000<br />
  Standby log position(file, page, LSN) = S0000036.LOG, 0, 000000000B3B0000<br />
  Log gap running average(bytes) = 0</p>
<p></strong>if it says anything other than &#8216;peer&#8217; then there is a problem. One common problem is a firewall&#8230; if you are doing this on a windows box with a firewall, then you will have to open up the HADR ports both ways.</li>
</ol>
<p> </p>
<p>You now have a HADR pair up and running &#8212; anything you do on the primary will be done on the standby as well.  Be sure to review things that don&#8217;t work. </p>
<p> </p>
<p>Standby for Part 3 where we will go over how to switch back and forth from primary to standby.</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=91</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DB2 HADR for dummies &#8211; Part 1</title>
		<link>http://dbmsguy.com/blog/?p=84</link>
		<comments>http://dbmsguy.com/blog/?p=84#comments</comments>
		<pubDate>Thu, 05 Nov 2009 14:12:37 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[db2]]></category>
		<category><![CDATA[hadr]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=84</guid>
		<description><![CDATA[HADR is a very easy and effective way to maintain a DR and/or standby for any given database.  You can implement it very quickly and simply and it works well.  In essence it is basically log shipping, but done in real time and elegantly.  It is not replication, so the standby database is not really [...]]]></description>
			<content:encoded><![CDATA[<p>HADR is a very easy and effective way to maintain a DR and/or standby for any given database.  You can implement it very quickly and simply and it works well.  In essence it is basically log shipping, but done in real time and elegantly.  It is not replication, so the standby database is not really accessible when in stand by mode.  As well, since it is basically log shipping, any operation that is not logged will not make it to the standby database.  Load operations can be a problem as are things like tables with &#8216;not logged initially&#8217;.  You will have to review your own situations as they arise.</p>
<p><span id="more-84"></span></p>
<p>One thing I do notice with HADR is that if you do an operation that is not allowable (such as load &#8230; not entirely true which will be explained later), it does not really tell you.  That means you could flip over to the standby and find it unusable.  Care is needed.</p>
<p>In this post (I&#8217;ll do it over multiple posts), I am going to run through an example of setting up HADR on a windows environment.  You can use one or two machines to try it out.  If you only have one machine, you need to define an additional instance to be the HADR.  A HADR relationship must at least be on different instances.  In real life, there is not much point in having an HADR pair on the same physical hardware.</p>
<p>Here are the basic steps to setting up a HADR pair</p>
<ol>
<li>Create/select your primary database</li>
<li>Set DB config parameters on primary db</li>
<li>Backup database</li>
<li>Restore database at standby site/instance</li>
<li>Set DB config parameters on standby db</li>
<li>Start HADR on standby then on primary site/instance</li>
<li>Validate HADR is connected and working</li>
<li>Test takeover function to switch primary/standby</li>
</ol>
<p>I&#8217;ll go over each step with examples in subsequent posts</p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=84</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>using excel to write sql</title>
		<link>http://dbmsguy.com/blog/?p=77</link>
		<comments>http://dbmsguy.com/blog/?p=77#comments</comments>
		<pubDate>Mon, 14 Sep 2009 17:35:25 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[db2]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=77</guid>
		<description><![CDATA[Excel is a wonderful tool that can be used to write sql using substitution from cells to cusomize and update or insert.  One problem has always been dates&#8230; they never come out right One solution to that is to use the TEXT format command to format it to DB2 formatted date&#8230; use =TEXT(cell ref,&#8221;yyyy-mm-dd&#8221;) in [...]]]></description>
			<content:encoded><![CDATA[<p>Excel is a wonderful tool that can be used to write sql using substitution from cells to cusomize and update or insert. </p>
<p>One problem has always been dates&#8230; they never come out right</p>
<p><span id="more-77"></span></p>
<p>One solution to that is to use the TEXT format command to format it to DB2 formatted date&#8230;</p>
<p style="text-align: left;">use =TEXT(cell ref,&#8221;yyyy-mm-dd&#8221;) in excel to format as a date that can be used in a formula when you generate sql</p>
<p style="text-align: left;"><a href="http://dbmsguy.com/blog/wp-content/uploads/2010/08/sql-build-sample.xls">sql-build-sample</a></p>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=77</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>find files using windows cmd</title>
		<link>http://dbmsguy.com/blog/?p=74</link>
		<comments>http://dbmsguy.com/blog/?p=74#comments</comments>
		<pubDate>Mon, 14 Sep 2009 17:32:32 +0000</pubDate>
		<dc:creator>Paul Mayhew</dc:creator>
				<category><![CDATA[tips]]></category>
		<category><![CDATA[windows]]></category>
		<category><![CDATA[file search]]></category>

		<guid isPermaLink="false">http://dbmsguy.com/blog/?p=74</guid>
		<description><![CDATA[To find text in a directory of files, use the following Windows command (it&#8217;s faster than Windows Search): This will search all files in the current directory for the text you are looking for: findstr /c:&#8221;I want to find this text&#8221; *.* If you want to also search sub-directories use the /s option: findstr /s [...]]]></description>
			<content:encoded><![CDATA[<div>To find text in a directory of files, use the following Windows command (it&#8217;s faster than Windows Search):</div>
<ul>
<li>This will search all files in the current directory for the text you are looking for: <strong>findstr /c:&#8221;I want to find this text&#8221; *.*</strong></li>
<li>If you want to also search sub-directories use the /s option: <strong>findstr /s /c:&#8221;I want to find this text&#8221; *.*</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://dbmsguy.com/blog/?feed=rss2&amp;p=74</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
