Search found 61 matches

by LtMandella
Mon Jun 20, 2016 11:25 am
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Re: Linq?

trying the simplest possible test psobject with a strongly typed date. measureobject throws error saying date is not numeric. Should measure-object be able to return the max of a group with dates? # create file with character strings for dates @” OrderId,Date,CustomerId 1,6/6/2012 9:12:44 AM,1 2,6/7...
by LtMandella
Tue Jun 14, 2016 3:53 pm
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Re: Linq?

I polled the users today and they expect they will have > 1000 records in a batch only very rarely. So for that reason, I am going with the powershell version. I may regret it. I can always revert to the sql server version if needed. In fact I did run into a limitation of powershell measure-object c...
by LtMandella
Tue Jun 14, 2016 2:23 pm
Forum: PowerShell GUIs
Topic: DB functionality failing for no apparent reason
Replies: 9
Views: 4446

DB functionality failing for no apparent reason

Product, version and build:2015 4.2.99 32 or 64 bit version of product:64 Operating system:win server 2008 r2 standard sp1 (in VM) 32 or 64 bit OS:64 PowerShell Version:2 About once a week under heavy editing/run cycles of a winform app, the app will execute but for no apparent reason will no longer...
by LtMandella
Mon Jun 13, 2016 3:58 pm
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Re: Linq?

[[Perhaps your approach is not optimal.]] Certainly possible. [[I can aggregate 10000 records in a minute or less assuming a useable machine.]] yes, that is about the performance I am getting from the powershell script I posted. 5K records in about 30secs. (although I then have to push it into a dat...
by LtMandella
Sat Jun 11, 2016 2:26 pm
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Re: Linq?

thank you! that might be a great solution, I will see if I can adapt it. But there are some columns in the dataset that are not duplicated (arbitrary unique system row numbers) and have to ignored (so you don't see them in the example but that is why I didn't use "*"). I also have to calcu...
by LtMandella
Sat Jun 11, 2016 12:48 am
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Re: Linq?

The rows in the datatable need to be de-duped and aggregation performed on any groups containing > 1 row. The natural key is a composite of a number of those columns. But not all of the columns are keys, so I could "max" or "min" a few more of them. But would that make a 20x to 3...
by LtMandella
Fri Jun 10, 2016 7:32 pm
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Re: Linq?

not complex, but a good amount of columns and rows... This works (copied pretty much verbatim from internet) but it did take about a minute for 10K recs, and that won't work of course for interactive GUI. I expect the powershell could be optimized, but I may just use the sql version since I doubt th...
by LtMandella
Fri Jun 10, 2016 3:09 pm
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Re: Linq?

thank you! I will experiment with group-object and the datatable dataview. In desperation I am bulk inserting the data into sql server and then reimporting back into datatable using sql grouping and aggregates. I will have some relatively large rowsets in the datatable ( > 5K records ) so performanc...
by LtMandella
Fri Jun 10, 2016 2:05 pm
Forum: PowerShell
Topic: Linq?
Replies: 23
Views: 14919

Linq?

Being a TSql coder for 20 years, I am clueless about using linq. However, now I have a powershell studio GUI app where I need to group and summarize data in a datatable (not in sql table). Do I have any options aside from LINQ? If it has to be LINQ does anyone have an example of what a LINQ query ag...
by LtMandella
Mon Mar 14, 2016 11:01 am
Forum: PowerShell GUIs
Topic: transcript from winform script
Replies: 10
Views: 5593

Re: transcript from winform script

[[Right now your workaround is the only one. Perhaps the programmers at Sapien can add an option to not use Out-Null. With Out-Null all output is tossed and does not get sent to the transcript engine. This is due to running a medal form which delays all output.]] no worries, thanks for the help Jvi...