<?xml version="1.0"?> <rss version="2.0">
<channel>
  <title>Zorba the Geek</title>
  <link>http://www.zorbathegeek.com</link>
  <description>A technical blog by Zorba the Geek covering SQL, PHP, XML, systems, data, gadgets, software etc. </description>
  <language>en-gb</language>
  <copyright>Copyright 2007 Eriginal Ltd</copyright> 
<item>
	<title>for across the network</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=174</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=174</guid>
<pubDate>14 Jul 2011 07:10:38 GMT</pubDate>
<description>
	<![CDATA[
I have found a recent blog very helpful but I
can't get it to work in my revised application.

The following is suppose to add a job number to
the front of .xls files with different names.

Neither options work but I can: copy /-Y
"Y:folder(Grating) *.xls"
.\%jobnumber%_(Grating).xls
but this would obviously copy multiple files to
overwrite the same filename.

The error is that the path or file is not found.

Can anyone tell me what is wrong please?

@ echo off
set /p jobnumber=What is the job number?

if "%jobnumber%"=="" goto 0
echo To copy one of the following to the current
folder:
echo 1. Grating 1
echo 2. Grating 2
echo Any other key - Quit

set /p userinp=Choose a number:
if "%userinp%"=="1" goto 1
if "%userinp%"=="2" goto 2
goto 0
:1
for %%a in ("Serverfolder1folder2(Grating)*.xls")
do copy "%%a" ".\%jobnumber%_%%a"
goto 0
:2
for %%a in ("Y:folder(Grating)*.xls") do copy
"%%a" ".\%jobnumber%_%%a"
goto 0

:0
pause
]]>
</description>
</item>
<item>
	<title>Bacth File Copying</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=173</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=173</guid>
<pubDate>25 Mar 2011 02:06:13 GMT</pubDate>
<description>
	<![CDATA[
<p>Hi guys, </p>
<p>Can you help me? I need a batch file that do copy&nbsp;certain file base on date in a folder, to another network drive.</p>
<p>thanks</p>
<p>adrinne</p>
]]>
</description>
</item>
<item>
	<title>Macro to insert footer</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=172</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=172</guid>
<pubDate>03 Nov 2009 23:46:36 GMT</pubDate>
<description>
	<![CDATA[
<p>
The following macro will insert a footer giving the page numbers, file loaction and name, and the date and time on the active sheet.

</p>

<div style="padding-left: 10px; width: 90%; border: 1px solid #c0c0c0; ">
<p>
Sub myfoot()
<br/>    &#39;Dim fullpath As String
<br/>   &#39;Dim sLeft As String
<br/>    &#39;Dim sRight As String
</p>

<p>

     fullpath = ActiveWorkbook.FullName
<br/>    Const sPAGE As String = "&P"
<br/>       Const sPAGES As String = "&N"
<br/>        Const sDATE As String = "&D"
<br/>      Const sTIME As String = "&T"
<br/>    
<br/>    sLeft = "Page " & sPAGE & " of " & sPAGES
<br/>        sRight = sDATE & " " & sTIME
 
<br/>    
<br/>      ActiveSheet.PageSetup.CenterFooter = fullpath
<br/>      ActiveSheet.PageSetup.LeftFooter = sLeft
<br/>        ActiveSheet.PageSetup.RightFooter = sRight

<br/>    End Sub
</p>
</div>
]]>
</description>
</item>
<item>
	<title>$this PHP Variable</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=171</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=171</guid>
<pubDate>10 Aug 2008 21:24:11 GMT</pubDate>
<description>
	<![CDATA[
<p>In PHP $this is a special variable and can't be assigned.</p>
<p>An hour later wondering why my $this and $that tests weren't working!</p>
]]>
</description>
</item>
<item>
	<title>php5 extensions directory and mysql undefined function</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=170</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=170</guid>
<pubDate>21 Jan 2008 17:58:53 GMT</pubDate>
<description>
	<![CDATA[
<p>Call to undefined function mysql_connect() or have a php.ini file which
doesn't seem to behave, i.e. the extension_dir seems to have a mind of its own
so the MySQL extensions aren't loading?&nbsp;</p>
<p>I was having this problem on a new install of Apache 2.2.8,
PHP 5.2.5, and MySQL 5.1.22 on Windows Vista Home Premium.&nbsp;</p>
<p> My first mistake downloading only the PHP installer. This does not include the
extensions. Download the zip package and copy the extensions folder from it into
your PHP directory. Edit php.ini, go to the dynamic extensions section and add the
following</p>
<pre>extension = php_mysqli.dll;
extension = php_mysql.dll;</pre>
<p>Make sure the extensions directory is set to the correct path. Reboot
Apache...</p>
<p>I was still getting the same error - call to undefined function. I spent a few hours on
google looking for the answer.&nbsp;This included copying php.ini, php_mysql.dll.
php_mysqli.dll and libmysql.dll into and out of various directories including c:&#92;windows
and c:&#92;windows&#92;system 32. None of which worked.&nbsp;</p>
<p>Back to the drawing board. phpinfo records the extensions path as being c:&#92;php5.
There's the answer. There is no such folder and this isn't where extension_dir
is pointed in php.ini? Why would it be picking up this directory?</p>
<p>As a shortcut I create the folder and copy the extensions into it. It still
doesn't work. I edit php.ini and change the slashes on the extensions directory and try various symantics</p>
<ul><li>c:&#92;program files&#92;php&#92;ext</li><li>c:/program files/php/ext</li><li>c:/program
    files/php/ext/</li></ul>
<p>Reboot Apache each time but it still doesn't work and the extension directory
in phpinfo is still pointing at the spectral c:&#92;php5. Where is
it picking this up?&nbsp; I find a few forums suggesting it's a permissions
problem. I disable all security settings, turn off User Account Control and open
all access to php.ini. It doesn't make a difference, I still get the same
message.&nbsp;</p>
<p>Back to basics. I open the Apache configuration file. It turns out the
solution is a lot simpler. PHPIniDir in httpd.conf is incorrect. It's pointing
to a folder which doesn't exist so windows has been using defaults to locate the
files. Change the folder name to the correct path &quot;C:&#92;Program Files&#92;PHP&#92;&quot;
including the closing slash. Restart Apache. Eureka.</p>
<p>I'm not the first person to have this problem. I won't be the last, if you
stumble on this post while you're having problems with an install concentrate on
phpinfo,&nbsp; particularly the Loaded Configuration File and the extension_dir,
and yes double check the settings on your web server.</p>
]]>
</description>
</item>
<item>
	<title>Windows Vista biggest disappointment of 2007</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=169</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=169</guid>
<pubDate>17 Dec 2007 19:58:28 GMT</pubDate>
<description>
	<![CDATA[
<p>If you're buying retail and go into any of the high street stores such as PC
World, Comet, Currys, John Lewis, Dixons, Tesco all laptops on sale come
pre-installed with Windows Vista. If you go online to Compaq, Toshiba, Sony, HP,
Acer and the rest, you have no choice but to buy Windows Vista. In fact, all
websites display the same message &quot;Toshiba recommends Windows Vista&quot;,
&quot;HP recommends Windows Vista&quot;, &quot;VAIO recommends Windows
Vista&quot;, &quot;Acer recommends Windows Vista&quot; on and on ad nauseam.</p>
<p>With the consistent wording, these recommendations clearly originate from
Microsoft rather than clinical engineering tests. Microsoft are heavily
incentivising manufacturers to push Vista which has unbelievably been in
development since 2001, consuming Microsoft people and money. Despite this,
Vista, delivered three years late, doesn't perform any better than XP and needs
some serious hardware just to run the graphical &quot;Aero&quot; interface such
as 1GB of system memory and a 40GB hard drive capacity.&nbsp;&nbsp;</p>
<p>Business customers running Vista Business were thrown a life buoy, being <b>quietly
allowed to &quot;downgrade&quot; to XP</b>. Retail customers, however, don't
have the same licensing choice.&nbsp;If you have it, you're stuck with it. The main change in Vista is the unnecessary user
interface and an improved search function as it tries to catch up with Google.
Oh, and <i>My Computer</i> has been renamed <i>Computer</i>.</p>
<p>With Vista OS I am reminded of the Apple II being replaced with the Apple III
in the early 1980s. The Apple III was designed by Marketeers and was the beginning
of the end of Apples leading market position until it started to find itself
again with the iPod. Vista has the look and feel of a development being led by
Marketeers, it's not an operating system of choice.</p>
<p>So what is the alternative? As you can't seem to buy a laptop with XP you can
return to Apple and the MAC OS (once it's not the &quot;leopard&quot; 10.5) or
you can build your own with a Linux distribution such as <a href="http://www.ubuntu.com/products/WhatIsUbuntu/desktopedition" target="_blank">Ubuntu</a>,
i.e. buy a Vista Laptop and uninstall the Vista OS. For the moment, my choice is
not to buy.</p>
<p>Is it any wonder <a href="http://www.pcworld.com/article/id,140583-page,5-c,techindustrytrends/article.html" target="_blank">Vista
is ranked number one by PC World as the biggest tech disappointment of 2007</a>?</p>
<ol>
  <li>Windows Vista</li>
  <li>The High Definition format War</li>
  <li>Facebook Beacon</li>
  <li>Yahoo</li>
  <li>Apple iPhone</li>
  <li>The Broadband Industry</li>
  <li>Voice Over IP</li>
  <li>Apple &quot;Leopard&quot; OS 10.5</li>
  <li>Microsoft Office 2007</li>
  <li>Wireless Carriers</li>
  <li>Microsoft Zune</li>
  <li>Internet Security</li>
  <li>Social Networks</li>
  <li>Municipal WiMax</li>
  <li>Amazon Unbox</li>
</ol>
<p>&nbsp;</p>
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/GVOnFdMf0RU&rel=1&border=0"></param>
<param name="wmode" value="transparent"></param>
<embed src="http://www.youtube.com/v/GVOnFdMf0RU&rel=1&border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355">
</embed></object>
<p>I've also posted this on <a href="http://www.reallyannoyingshit.com" target="_blank">really annoying shit dot com</a>
</p>
]]>
</description>
</item>
<item>
	<title>Excel giving incorrect results</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=168</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=168</guid>
<pubDate>06 Nov 2007 00:19:07 GMT</pubDate>
<description>
	<![CDATA[
<p>There are occasions when Excel might not add up properly, even though you
still expect it to do so.&nbsp; Lets look at a very simple example to illustrate
the case. You can reproduce this yourself as you read.</p>
<p>I have a small table of data, four columns wide. There are two row entries.</p>
<p><img border="0" src="http://www.zorbathegeek.com/img/there_1.gif" width="383" height="125" alt="Simple table of data"/></p>
<p>I want a summary of&nbsp; the data in the table. Specifically I am after a
sum of column C where the code in column A is A, and I want the sum of column D
where the code in column B is B. In both cases this should give me a result of
200 or -200.</p>
<p>The respective formulae to summarise by A code are =SUMIF(A:C,F2,C:C) and =SUMIF(B:D,F2,D:D).
The respective formulae to summarise by B code are =SUMIF(A:C,F3,C:C) and =SUMIF(B:D,F3,D:D).</p>
<p>The results given....</p>
<p><img border="0" src="http://www.zorbathegeek.com/img/there_2.gif" width="258" height="117" alt="SUMIF doesn't return the correct result"/></p>
<p>As you can see, Excel incorrectly returns a value of -200 against the B code
in the summary of column C. Did you get the same result? This is a very
simplistic example to&nbsp; illustrate the need to validate any report or
analysis performed with Excel before publishing.</p>

<p>Of course, how you organise your data is also relevant. If the table were
instead organised as follows</p>

<p><img border="0" src="http://www.zorbathegeek.com/img/there_3.gif" width="365" height="116" alt="The data reorganised"/></p>

<p>the correct result is returned.</p>

<p><img border="0" src="http://www.zorbathegeek.com/img/there_4.gif" width="251" height="116" alt="The correct result"/></p>


]]>
</description>
</item>
<item>
	<title>SnagIt 8.2.0 workaround</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=167</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=167</guid>
<pubDate>21 Oct 2007 21:31:59 GMT</pubDate>
<description>
	<![CDATA[
<p>In Snagit 8.2.0 there does not seem to be any way to capture a tools type
drop down menu. When you get the menu ready and click back to Snagit, Snagit
becomes the active window. Of course, this means the menu on the screen you want
to capture is automatically closed and you can't get an open image of it.</p>
<p><img border="0" src="http://www.zorbathegeek.com/img/oracle_menu.jpg" width="183" height="175" alt="Oracle Help Menu"/></p>
<p>In order to do so you have to add in an extra step. Get your menu ready,
press the PrtSc button. Open Microsoft Paint or similar and paste the result,
using Ctrl V or the edit menu. If you use a photo package your screen shot
quality won't degrade as it will if you copy directly into Word.</p>
<p>At this point you can click the capture button in Snagit and select the menu
region as in the example above.</p>
<p><a href="http://www.techsmith.com/screen-capture.asp?CMP=KgoogleStmhome">Snagit
is a very nifty screen capture program from TechSmith</a>, very good for
creating documents quickly, or for editing, annotating or sharing your screen
shots. It's priced at &#36;39.95 for a single user licence.</p>
<p><img border="0" src="http://www.zorbathegeek.com/img/snagit8.jpg" width="300" height="240" alt="SnagIt 8.2.0"/></p>

]]>
</description>
</item>
<item>
	<title>Find Matching Text in Excel</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=166</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=166</guid>
<pubDate>29 Sep 2007 14:58:03 GMT</pubDate>
<description>
	<![CDATA[
<p>The search function in Excel allows you to search for a text string occurrence
within another text string. </p>
<p>Use to identify all rows where, for example, a description field, contains a
certain word. Perhaps you are looking for every row which contains the word
&quot;VAT&quot;.</p>
<p>=SEARCH(&quot;VAT&quot;,A1,1)</p>
<p>where column A contains the description field.</p>
<table class="simulator">
<caption>Find Matching Text</caption>
<thead>
<tr>
<th></th>
<th>A</th>
<th>B</th>
<th>C</th>
<th>D</th>
<th>E</th>



</tr>
</thead>
<tbody>
<tr>
<th>1</th>
<td>Novation of lease</td>
<td title="=SEARCH(&quot;VAT&quot;,A1,1)">3</td>
<td title="=ISERR(SEARCH(&quot;VAT&quot;,A1,1))">FALSE</td>
<td title="=IF(ISERR(SEARCH(&quot;VAT&quot;,A1,1))=TRUE,&quot;&quot;,&quot;Matching String&quot;)">Matching String</td>
<td></td>

</tr>

<tr>
<th>2</th>
<td>Some other text</td>
<td title="=SEARCH(&quot;VAT&quot;,A1,1)">#VALUE</td>
<td title="=ISERR(SEARCH(&quot;VAT&quot;,A1,1))">TRUE</td>
<td title="=IF(ISERR(SEARCH(&quot;VAT&quot;,A1,1))=TRUE,&quot;&quot;,&quot;Matching String&quot;)"></td>
<td></td>
</tr>

<tr>
<th>3</th>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>

</tr>



</tbody>
</table>

<p>If the string is not found the #VALUE error is returned. If the string is
found you are given the starting position it occurs. In the above example, the
word &quot;VAT&quot; starts at the third character.</p>
<p>To tidy up the results you can use the ISERR function to determine whether or
not the error will occur. i.e. FALSE means the text is found, TRUE means it
isn't.</p>
<p>=ISERR(SEARCH(&quot;VAT&quot;,A1,1))</p>
<p>Then use the IF function for a final tidy up. If the ISERR function is TRUE
don't return anything, otherwise display &quot;Matching String&quot; in the
cell.</p>
<p>=IF(ISERR(SEARCH(&quot;VAT&quot;,A1,1))=TRUE,&quot;&quot;,&quot;Matching String&quot;)</p>
<p>Use the SEARCH function with caution. In this example I was searching for the
word VAT. This letter sequence is contained in other words, such as No<u>vat</u>ion,
which may not be quite what you were you looking for in your results. If you are
running the function over a large dataset you might not pick up this logical
error.</p>

]]>
</description>
</item>
<item>
	<title>Excel macro to copy to Custom Template</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=165</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=165</guid>
<pubDate>18 Aug 2007 09:50:35 GMT</pubDate>
<description>
	<![CDATA[
<p>The following macro copies an Excel sheet to a custom template. All you need
do is set the template path to your own or a network drive. This is really only
a snippet to demonstrate the concept but is a complete macro nonetheless. I've
used it within a more complex process to generate invoices from a data file,
then copy each invoice to a separate file to email out as an attachment. This
was a temporary solution during the lead up to a billing system change for a
Telecoms client.&nbsp;



</p>
<p>I've used this to get around not being able to copy headers and footers in
Excel and to avoid copying common drawing objects such as a logo and text boxes.
By having these set in the template I didn't need to copy them each time the
process looped.



</p>
<div style="padding-left: 10px; width: 90%; border: 1px solid #c0c0c0; ">
<p>
Sub copy_ActiveSheet()
<br/>    Dim wb As Workbook
<br/>    Dim source As Range
<br/>    Dim dest As Workbook
</p>

<p>
'Enter the path to your template file
<br/>    Const TemplatePath As String = "C:mark.xlt"
<br/>
<br/>    Set source = Nothing
<br/>    On Error Resume Next
<br/>    Set source = Cells.SpecialCells(xlCellTypeVisible)
<br/>    On Error GoTo 0
<br/>
<br/>    Application.ScreenUpdating = False
 
<br/>    Set dest = Workbooks.Add(TemplatePath)
<br/>    source.Copy
<br/>    With dest.Sheets(1)
<br/>        .Cells(1).PasteSpecial xlPasteValues, , False, False
<br/>        .Cells(1).PasteSpecial xlPasteFormats, , False, False
<br/>        .Cells(1).Select
<br/>        Application.CutCopyMode = False
<br/>    End With
</p>
</div>

]]>
</description>
</item>
<item>
	<title>UK Post Code GeoCoding</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=164</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=164</guid>
<pubDate>13 Jun 2007 12:01:20 GMT</pubDate>
<description>
	<![CDATA[
<p>The PAF (<a href="http://www.royalmail.com/portal/rm/jump2?catId=400084&amp;mediaId=400085">Postcode
Address File</a>) is the complete address database of the UK containing over 27
million addresses and some 1.7 million post codes. <a href="http://www.royalmail.com/portal/rm/jump2?catId=400084&amp;mediaId=400088">Postzon</a>
is the Royal Mails product which links post codes with ordinance survey and grid
reference data. These products are licensed
by the Royal Mail and are not free which can make access to the data prohibitive
for some users.&nbsp;</p>
<p>As geocode data is freely available in countries such as Canada, Germany,
Italy, Spain, France and the USA various hacks have been devised for the UK,
including <a href="http://www.freethepostcode.org/"> community compiled post code
databases</a>, and a petition, which can only
be doomed to fail, to try and <a href="http://petitions.pm.gov.uk/FreePostcodes/">force
the Royal Mail to release their data for free</a>.</p>
<p>The Royal Mail is in the process of revising it's pricing structure,
recognising it has in the past favoured larger organisations. The price changes
are being phased in and will culminate in all licences being replaced with new
terms and conditions on 1st September, 2009. Although these changes are welcome
it still means the data isn't free and websites which are non commercial or have
low levels of users may still need to look elsewhere if they wish to include
mapping information in their web applications.</p>
<p>UK Post Codes are made up of two parts as in SW1A 2AA, the post
code for Number 10 Downing Street. The first part is the outward code
identifying the delivery office the mail has to go to, and the second part is
the inward code which, when combined with the building name or number, gives the
delivery point.</p>
<table border="1" cellpadding="0" cellspacing="0" width="453">
<thead style="background: #c0c0c0;">
  <tr>
    <th>Part</th>
    <th>Meaning</th>
    <th>Number</th>
  </tr>
  </thead>
  <tbody>
  <tr>
    <td>SW</td>
    <td>The post code area</td>
    <td>124 in the UK</td>
  </tr>
  <tr>
    <td>SW1A</td>
    <td>The post code district</td>
    <td>Approximately 20 districts per area</td>
  </tr>
  <tr>
    <td>SW1A 2</td>
    <td>The post code sector</td>
    <td>Approximately 3,000 addresses per sector</td>
  </tr>
  <tr>
    <td>SW1A 2AA</td>
    <td>The post code unit</td>
    <td>Approximately 15 addresses per unit.</td>
  </tr>
  </tbody>
</table>
<p>The district codes (approximately 2,800) with <a href="http://www.jibble.org/ukpostcodes/">latitude
and longitude coordinates can be downloaded from Jibble</a>, but if you want
more precision in your maps you need to look at the full post code unit.&nbsp;</p>
<p>The definitive tutorial on <a href="http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/">geocoding
UK postcodes with Google Map API</a> was written by <a href="http://www.tomanthony.co.uk/blog/">Tom
Anthony</a> on his blog earlier in the year. He has since followed it up with <a href="http://www.tomanthony.co.uk/blog/caching-google-maps-geocoder-results/">Caching
Google Maps Geocoder Results</a>, another easy to follow well written tutorial
on how to, at least temporarily, save your results. For a complete post code
unit, however, there are on average 15 addresses so basing a marker on the post code
unit will not be precisely accurate, i.e. it will not identify a specific
address. To do that you need to include the building name or number. </p>
<p>Tom's method is based on form imput of the post code, but if you already have
the post code in a database you can just call the javascript function directly,
as in</p>




<p>&lt;script type="text/javascript"&gt;<br/>
usePointFromPostcode('&lt;?php echo $postcode; ?&gt;', placeMarkerAtPoint);<br/>
&lt;/script&gt;</p>
<p>The result, however, is a proximity map rather than identifying a specific
address. Remember there are approximately 27 million addresses in the UK and
only 1.7 million post codes.</p>

<p>Post Code data is not static and for licensed copies of the Royal Mail data
there are regular updates. If you pass lat and long coordinates back into a
database to avoid hitting the Google or Multimap servers to obtain the
coordinates there is a risk, probably quite remote, of your data being out of
date. You could mitigate this by adding a date field to your database table so
you could check the lat long coordinates at a frequency, say every six months,
or a year.</p>

<p>The API keys for Google Maps and Google Search can be optained from </p>
<ul>
  <li><a href="http://www.google.com/apis/maps/signup.html">Google Maps</a></li>
  <li><a href="http://code.google.com/apis/ajaxsearch/signup.html">Google Search</a></li>
</ul>
]]>
</description>
</item>
<item>
	<title>Accept User Input in SQL*Plus</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=163</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=163</guid>
<pubDate>05 May 2007 17:11:02 GMT</pubDate>
<description>
	<![CDATA[
<p>You can allow users to enter parameters in SQLPlus queries by using accept
and prompt. An example of the syntax is </p>

<div style="border: 1px solid #c0c0c0; padding: 5px; width: 90%">
accept startdate prompt "Enter Start Date: "

</div>



<p>startdate is the parameter value and the where condition would then include the parameter
as follows </p>
<div style="border: 1px solid #c0c0c0; padding: 5px; width: 90%">
WHERE date &gt;= '&amp;startdate'

</div>


<p>The example below I saved for use in a batch file. A user could then click
the batch file which would open SQLPlus and prompt the user for the query
parameters including a &quot;Save File As&quot; prompt, as the output was
generating a csv file. The batch file icon can be changed in Windows to
something other than the default, something more meaningful for the user.</p>

<p>The appearance might be very retro, but its a simple tool of the &quot;cheap
and cheerful&quot; variety and the user is, after all, more interested in the
output file.</p>
<p><img border="0" src="http://www.zorbathegeek.com/images/sqlplus_screen3.jpg" alt="The Retro SQL*Plus Screen" width="430" height="213"/></p>


<div style="border: 1px solid #c0c0c0; padding: 5px; width: 90%">
<p>accept filesave prompt "Save File As: "
<br/>accept code prompt "Enter Carrier Code: "<br/>
accept startdate prompt "Enter Start Date: "<br/>
accept enddate prompt "Enter End Date: "<br/>
SET NEWPAGE 0<br/>
SET SPACE 0<br/>
SET PAGESIZE 0<br/>
SET WRAP OFF<br/>
SET LINESIZE 1000<br/>
SET ECHO OFF<br/>
SET FEEDBACK OFF<br/>
SET VERIFY OFF<br/>
SET HEADING OFF<br/>
SET MARKUP HTML OFF<br/>
SPOOL C:&#92;reports&#92;'&amp;filesave'.csv;<br/>
SELECT /* The purpose of this query is to ...... Always good policy to annotate
queries */<br/>
    carrier_id, carrier_name, calls, minutes, turnover
FROM<br>
    carriers_data<br/>
WHERE<br/>
   trunc(adj_start_time) >= '&amp;startdate'<br>
    AND  trunc(adj_start_time) &lt; '&amp;enddate'<br>
    AND    carrier_id = '&amp;code' </p>
    
  </div>

]]>
</description>
</item>
<item>
	<title>Exit SQLPlus from Batch File</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=162</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=162</guid>
<pubDate>05 May 2007 12:57:57 GMT</pubDate>
<description>
	<![CDATA[

<p>

If you have a batch file set to run multiple SQLPlus queries and to then perform some other action such as merge the results
together into a single file, or copy the files elsewhere you need to physically exit SQLPlus or the batch file 
will not continue to run and execute the commands.
</p>
<p>
To exit SQLPlus automatically skip a line after your last query and type exit as in
</p>
<div style="border: 1px solid #c0c0c0; width: 90$; padding: 5px;">
&#64;C:&#92;Queries&#92;Query_1.sql<br/>
&#64;C:&#92;Queries&#92;Query_2.sql<br/>
&#64;C:&#92;Queries&#92;Query_3.sql<br/>
&#64;C:&#92;Queries&#92;Query_4.sql<br/>
<br/>
EXIT
</div>
]]>
</description>
</item>
<item>
	<title>Run Multiple SQLPlus Queries via DOS batch file</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=161</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=161</guid>
<pubDate>05 May 2007 12:51:01 GMT</pubDate>
<description>
	<![CDATA[

<p>To run multiple SQLPlus queries as part of a DOS batch file place all the
queries in a separate SQL file. For Example</p>
<div style="border: 1px solid #c0c0c0; width: 90$; padding: 5px;">
&#64;C:&#92;Queries&#92;Query_1.sql<br/>
&#64;C:&#92;Queries&#92;Query_2.sql<br/>
&#64;C:&#92;Queries&#92;Query_3.sql<br/>
&#64;C:&#92;Queries&#92;Query_4.sql<br/>
</div>
<p>Save the file as runall.sql. Then use this file in your batch file</p>
<div style="border: 1px solid #c0c0c0; width: 90$; padding: 5px;">
@Echo Off<br/>
sqlplus [login details] &#64;C:&#92;queries&#92;runall.sql <br/>
EXIT
</div>
]]>
</description>
</item>
<item>
	<title>CSS Browser Differences IE and Firefox</title>
		<link>http://www.zorbathegeek.com/detcom.php?blogid=160</link>
<guid isPermaLink="true">http://www.zorbathegeek.com/detcom.php?blogid=160</guid>
<pubDate>04 May 2007 13:38:01 GMT</pubDate>
<description>
	<![CDATA[
<p>You can design the most beautiful <a href="http://jigsaw.w3.org/css-validator/"> CSS compliant web, all validated to W3C
standards</a>, only to find its almost completely unreadable or unusable in another
browser. Font sizes are microscopic, menus don't appear as they may now be
hidden under a layer, and the layout is all wrong. Worse, it just doesn't look
as if its been professionally designed, and if you have already published it,
all you can do is cringe before rolling up your sleeves and correcting it. </p>
<p>Browsers have different defaults. Internet Explorer seems to have more than
others, so if you design and test using only IE your pages may not display
properly in other browsers. As a rule you should test your site with other
browsers before publishing it.</p>
<p>There is hack you can use for Internet Explorer to ensure it reads the right
CSS and your site is cross browser compliant. This hack is achieved by simply
adding !important to the css you want Internet Explorer to ignore. The following
CSS creates similar font size across browsers. IE ignores the first line,
whereas Firefox applies the first line.</p>
<div style="border: 1px solid #c0c0c0; width: 90%; padding: 5px;">
<br/>body<br/>
{<br/>
font-size: medium !important;<br/>
font-size: x-small;<br/>
}<br/>

</div>
<p>As another rule you should try to not mix your stylesheet with inline CSS,
i.e. if you define an element in your stylesheet then add some inline CSS to it,
the stylesheet CSS may be completely ignored and you may end up with a result
you don't want..</p>
]]>
</description>
</item>
</channel>
</rss>
