Forum Replies Created

Viewing 15 posts - 1,231 through 1,245 (of 6,679 total)

  • Reply To: parse files in folder

    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 =...
  • Reply To: parse files in folder

    Not really - if you can provide sample data from several different files, include the first 3 or 4 segments for each file - I can put something together to...

  • Reply To: parse files in folder

    Can you provide some sample data?  The first 3 or 4 segments from several files - without any protected/private information?

     

  • Reply To: parse files in folder

    You could change the $date parameter to a datetime data type - then create a separate variable for the string format:

    [parameter(mandatory = $true, ValueFromPipelineByPropertyName = $true)][datetime]$date,

    $stringDate =...
  • Reply To: parse files in folder

    Jeff Moden wrote:

    Thanks for the feedack, Jeffrey...

    I totally agree that trying to fully parse EDI files in SQL Server is a bit crazy and even I probably wouldn't go there, especially...

  • Reply To: parse files in folder

    Jeff Moden wrote:

    Let me answer your question with other question... What are you doing for logging of the file receipt and copy/move (whatever) and what are you using to schedule this...

  • Reply To: parse files in folder

    You don't need a cmd or bat file - that is what powershell replaces and you don't need to look to a position in the file because the record is...

  • Reply To: Excessive Blocking despite Read Committed Snapshot Isolation

    If I am reading the documentation correctly - switching to OCC in DynamicsAX changes the UPDLOCK to NOLOCK.  If that is the case, then I wouldn't make that switch -...

  • Reply To: parse files in folder

    Bruin wrote:

    SO there is a default format for inbound files

    Position 36 of the record contains 1st parm and has a length of 15 Position 71 of record contains 2nd parm...

  • Reply To: parse files in folder

    Jeff Moden wrote:

    Bruin wrote:

    The above lookups are in the 1st record in file using criteria above. I need some help ...

    THanks.

    What's stopping you from reading the first two rows using Bulk...

  • Reply To: Sql query - Projected Monthly Revenue

    This would be much easier using a Calendar table or function.  We can get those counts by generating the list of dates - then counting the dates that are weekends,...

  • Reply To: parse files in folder

    The files appear to be EDI files - which might lead to a problem.  EDI files may not have CR\LF as record terminator - the EDI documentation will show the...

  • Reply To: parse files in folder

    Setting up the parameters as mandatory will also prompt the user.  Try it..

     

  • Reply To: parse files in folder

    To setup parameters in a script - you can use something like this:

    param (
    [parameter(mandatory = $true, ValueFromPipelineByPropertyName = $true)][string]$hdr,
    [parameter(mandatory = $true, ValueFromPipelineByPropertyName = $true)][datetime]$date,
    [parameter(mandatory = $true, ValueFromPipelineByPropertyName...
  • Reply To: Upgrade to larger drive

    When copying the files - you can use Robocopy with appropriate switched to copy the files and folders with permissions.  I just recently did this on a server where the...

Viewing 15 posts - 1,231 through 1,245 (of 6,679 total)