All pastes #634974 Raw Edit

Unnamed

public text v1 · immutable
#634974 ·published 2007-07-26 19:24 UTC
rendered paste body
<!--  
This is the processing definition for the SQLExe program.  It's purpose is to execute a SQL statement in 
an Access database without having to use the Access Macro that doesn't seem to work when headless.

The definition consists of one or more 'Job' specifications as follows:

DB describes the FULL path to the source DB.
	Special flags available for use within the string:
	$d$ - Replace with the CURRENT date as specified
    $p5$ - Replace with the PROCESS date as specified (Assuming 5 process days/week)
    $p7$ - Replace with the PROCESS date as specified (Assuming 7 process days/week)

By 'as specified' I mean different patterns of D, M, and Y to define a date.  For example:
    $dYYYYMM$ - means replace the string with TODAY'S YEAR and Month
        c:\$dYYYYMM$\myDB.MDB yields c:\200701\myDB.MDB (if today happens to be in January, 2007!)

    $p5MMDDYYYY$ - means replace the string with the 5 day/week PROCESS DATE'S 2 digit month, 2 digit day, 4 digit year
        c:\$p5MMDDYYYY$\myDB.MDB yields c:\01132007\myDB.MDB (if the process date happens to be January 13, 2007!)

    $p7MMDDYYYY$ - means replace the string with the 7 day/week PROCESS DATE'S 2 digit month, 2 digit day, 4 digit year
        c:\$p7MMDDYYYY$\myDB.MDB yields c:\01132007\myDB.MDB (if the process date happens to be January 13, 2007!)

Process Date (PROCDATE) is defined as: 
	TODAY if time is >= 6:00 PM, else it is YESTERDAY.
	If (DaysPerWk = 5)then
		If TODAY or YESTERDAY is Saturday or Sunday, PROCDATE is FRIDAY.

SQL describes the SQL statement to execute against the DB specified.

Additionally, at the outermost level, the RunningOn key is used to describe the location of the running.on file 
used to indicate success to infomgr.  (The full path must be listed, including the filename.)  If not being run 
from infomgr, leave as an empty string ("").

SPECIAL NOTE: If you need to do a SQL statement that has an XML special character in it, such as the '&', then you
need to put the XML special character in the SQL statement in place of the expected SQL character.  The XML engine
will replace it with the correct character.  Otherwise, the XML engine will attempt to put XML meaning onto it.

For example, you need the following SQL:  "update tblah set cblah = cblah & 'test'"  In order to prevent the '&'
from being interpreted, you need to 'escape' the special character for XML to process it.  The XML should state:
'update tblah set cblah = cblah &amp; 'test'".  The XML engine will replace '&amp;' with the '&'.

-->

<SQLExe>
	<RunningOn path="c:\sched\Running.On" />
	<Job>
		<DB path="d:\bancvue\topvue\genpfcu.mdb" />
		<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;7703121690&quot; " />
	</Job>
	<Job>
			<DB path="d:\bancvue\topvue\genpfcu.mdb" />
			<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;0000959780&quot; " />
	</Job>
	<Job>
			<DB path="d:\bancvue\topvue\genpfcu.mdb" />
			<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;7703370090&quot; " />
	</Job>
	<Job>
			<DB path="d:\bancvue\topvue\genpfcu.mdb" />
			<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;0000804590&quot; " />
	</Job>
	<Job>
			<DB path="d:\bancvue\topvue\genpfcu.mdb" />
			<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;7703160001&quot; " />
	</Job>
	<Job>
			<DB path="d:\bancvue\topvue\genpfcu.mdb" />
			<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;0179600120&quot; " />
	</Job>
	<Job>
			<DB path="d:\bancvue\topvue\genpfcu.mdb" />
			<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;0205090170&quot; " />
	</Job>
	<Job>
			<DB path="d:\bancvue\topvue\genpfcu.mdb" />
			<SQL stmt="UPDATE RCDDA SET RCDDA.ServiceChargeCode=&quot;78&quot; WHERE RCDDA.AcctNumber=&quot;0420680120&quot; " />
	</Job>

	</SQLExe>