How to Get Numeric Year, Month, Day from a Date in Oracle PL/SQL

Use the Oracle PL/SQL “Extract” function to extract the Year, Month, Day into separate columns for sorting/grouping: <pre> select    EXTRACT(YEAR FROM Creation_Date) as Year,    EXTRACT(MONTH FROM Creation_Date) as Month,    EXTRACT(DAY FROM Creation_Date) as Day,    Creation_Date from PO.PO_HEADERS_INTERFACE  POI </pre>

How to format a date in Oracle PL/SQL

Date fields in Oracle hold the time, but by default, the time is not displayed. Below is a sample of how to format the date with time: <pre>    TO_CHAR(CREATION_DATE, 'YYYY-MM-DD HH24:MI:SS') as CREATION_DATE </pre> Example: <pre> select Creation_Date, TO_CHAR(CREATION_DATE, 'YYYY-MM-DD HH24:MI:SS') as CREATION_DATE_Fmt from PO.PO_HEADERS_ALL where Creation_Date is not null order by Creation_Date desc […]

Gac/UnGac (GacUtil) from Powershell

Here’s a sample of how I GAC and UnGAC DLLs from Powershell. I think I got this on StackOverflow, but don’t have the link handy now. (GAC, of course, refers to the .NET Global Assembly Cache. All BizTalk artificats and C# programs must be in the GAC to be called from a BizTalk orchestration). <pre> […]

AWS Lambda – cannot find module (based on handler)

Error in the Execution Result <pre> Response: {   "errorType": "Runtime.ImportModuleError",   "errorMessage": "Error: Cannot find module 'decode-verify-jwt'", Response: {   "errorType": "Runtime.ImportModuleError",   "errorMessage": "Error: Cannot find module 'decode-verify-jwt'", </pre> and also the following text appears: <pre>        Lambda can't find the file decode-verify-jwt.js. Make sure that your handler upholds the format: file-name.method. </pre> Solution I uploaded the […]

BizTalk RawString – How to receive non-XML message into Orchestrations without a Custom Pipeline

I needed to implement RawString functionality to be able to read a non-XML file into an orchestration. Scott Colestock had a great article on this on his TraceOfThought blog, but when I needed it the other day, it had been hacked (hopefully only temporary). 1. Deploy the C# code towards the bottom of this log; […]

Email a list of new files (Powershell)

My goal here was to send myself an email of all new files received from vendors. This is assuming the files are not picked up and processed by BizTalk automatically. If that were the case, you might be able to point the folders to your archive directories and still achieve the same results. In my […]

Powershell – get new files, i.e. files less than x day old

How to get files created in the most recent x days. <pre> $days = -3 $folderMask = "c:\BizTalk\Vendors\*\AS2FilesReceived\*.*" $files = Get-ChildItem -Path $folderMask -File | Where-Object {$_.CreationTime -gt (Get-Date).AddDays($days)} | Sort-Object FullName Write-Host "Number of New AS2 Files = $($files.Count)" </pre>

Valid or Convert Ethereum Address to CheckSum Format in NodeJS

First run npm to install js-sha3 (See GitHub https://github.com/emn178/js-sha3 This example show how to do it without using web3 library, in case you don’t have an ETH node to connect to, or can’t get the library working. npm install js-sha3 Subroutines below come from either agove GitHub or https://ethereum.stackexchange.com/questions/1374/how-can-i-check-if-an-ethereum-address-is-valid

Powershell Format Date/Time for Display and for FileName

The following is code I copy and paste a lot into my various Powershell prorams. The commented out line creates a backup zip file, so I like to have the file name with the date/time in it. $fmtDateTime = $(get-date -f “MM/dd/yyyy HH:mm:ss”) Write-Host “Start Time: $fmtDateTime” $fileDateTime = $(get-date -f “MM_dd_yyyy__HH_mm_ss”) Write-Host “File DateTime: […]

Oracle: Query table names and column names

Use the queries to find database tables for an owner (namespace/schema), tables containing certain phrases, all columns in a table, or column containing a certain phrase. <pre> — All tables for an owner (prefix before table name) SELECT owner, table_name FROM all_tables where owner = 'PO'; — Find table names SELECT owner, table_name FROM all_tables […]