Viewing 15 posts - 1,216 through 1,230 (of 6,678 total)
Thanks for update to script...
I started it and got a message: You cannot call a method on a null-valued expression Error came from:
if (($firstRow[6].Trim() -eq $Sender -or $Sender -eq...
March 17, 2021 at 9:53 pm
I have provided code and samples - it is up to you to use that as a basis for extending and modifying the code to meet your requirements. I have...
March 17, 2021 at 8:00 pm
I outputted these values:
# Validate this is an EDI file $fileData.Substring(0,3) ISA
# Get the data element separator and segment element separator $dataElement = $fileData.Substring(3,1); *
$segmentElement = $fileData.Substring(105,1); {
It seems...
March 17, 2021 at 6:30 pm
I attache the schema of sample data scrambled for testing
What is the expected output from this data?
March 17, 2021 at 4:04 pm
That function can be rewritten to perform a lot better - but to do that we need sample data and tables to test, with expected results based on the sample...
March 17, 2021 at 1:32 am
The code already figures out the data element separator based on the 4th position in the file - or for segment element separator the 106th position of the ISA record.
March 17, 2021 at 1:23 am
You may also need to increase the number of bytes - that could be causing the 'second' row to be missing data that could cause an issue. Change the line...
March 16, 2021 at 9:12 pm
Add an output statement to show which file is being processed - then review the file to see why the data is not being parsed as expected. The error is...
March 16, 2021 at 8:40 pm
Thanks for replies... I'll test that code out..
Do you anticipate with 1000's of files to search this lookup to be slow?
Thanks.
Not sure - no real way to determine how...
March 16, 2021 at 7:57 pm
Take a look here: https://dbatools.io/
They have a full set of tools that can be used and easily handle the automation of synchronizing logins between systems, including the SID and password.
March 16, 2021 at 5:55 pm
Okay - we can make the parameters required and allow for blank values. For further information on how to setup and configure parameters, see this article: https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters?view=powershell-7.1
param...
March 16, 2021 at 5:13 pm
You have to set a default value for the parameter, as in my example.
March 16, 2021 at 1:49 am
I provided examples how to call the script with different parameters.
You can add any other parameters needed.
March 16, 2021 at 12:33 am
The basic reason for separating reporting onto another server is to move that processing off the production system. If someone creates a query that needs to load a lot of...
March 15, 2021 at 10:00 pm
Here is something that might work:
param (
[parameter(mandatory = $false, ValueFromPipelineByPropertyName = $true)][string]$Sender = "038962429",
[parameter(mandatory = $false, ValueFromPipelineByPropertyName = $true)][datetime]$FileDate = "2021-03-09",
[parameter(mandatory = $false, ValueFromPipelineByPropertyName = $true)][string]$RecordType =...
March 15, 2021 at 8:15 pm
Viewing 15 posts - 1,216 through 1,230 (of 6,678 total)