Jump to content
Software FX Community

christianv

Members
  • Posts

    7
  • Joined

  • Last visited

christianv's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Yes, if I run the following : invoke-sql -server SACPANICS01 -SQL "set nocount ondeclare @xx table(dataflow varchar(50), FLOW_PROCESS_MIN int,FLOW_DELTA int)insert into @xxSELECT top 26 DATAFLOW, FLOW_PROCESS_MIN, FLOW_DELTA FROM icsadmin.dbo.DataFlowStats (nolock) ORDER BY AuditTimeStamp DESC UPDATE @xx SET FLOW_DELTA = 0 WHERE dataflow IN ('MQMSGMUREX','MQSEQMUREX')SELECT SUM (FLOW_PROCESS_MIN) as Processed,SUM (FLOW_DELTA) as Delta from @xx" | select Processed, Delta I get: Processed Delta --------- ----- 946 946 but I want to do this in one Invoke-sql query Can this be done? Thanks
  2. This is what I get, hope this helps us all TypeName: System.Data.DataRowName MemberType Definition---- ---------- ----------AcceptChanges Method System.Void AcceptChanges()BeginEdit Method System.Void BeginEdit()CancelEdit Method System.Void CancelEdit()ClearErrors Method System.Void ClearErrors()Delete Method System.Void Delete()EndEdit Method System.Void EndEdit()Equals Method System.Boolean Equals(Object obj)GetChildRows Method System.Data.DataRow[] GetChildRows(String relationName), System.Data.DataRow...GetColumnError Method System.String GetColumnError(Int32 columnIndex), System.String GetColumnErro...GetColumnsInError Method System.Data.DataColumn[] GetColumnsInError()GetHashCode Method System.Int32 GetHashCode()GetParentRow Method System.Data.DataRow GetParentRow(String relationName), System.Data.DataRow G...GetParentRows Method System.Data.DataRow[] GetParentRows(String relationName), System.Data.DataRo...GetType Method System.Type GetType()get_HasErrors Method System.Boolean get_HasErrors()get_Item Method System.Object get_Item(Int32 columnIndex), System.Object get_Item(String col...get_ItemArray Method System.Object[] get_ItemArray()get_RowError Method System.String get_RowError()get_RowState Method System.Data.DataRowState get_RowState()get_Table Method System.Data.DataTable get_Table()HasVersion Method System.Boolean HasVersion(DataRowVersion version)IsNull Method System.Boolean IsNull(Int32 columnIndex), System.Boolean IsNull(String colum...RejectChanges Method System.Void RejectChanges()SetAdded Method System.Void SetAdded()SetColumnError Method System.Void SetColumnError(Int32 columnIndex, String error), System.Void Set...SetModified Method System.Void SetModified()SetParentRow Method System.Void SetParentRow(DataRow parentRow), System.Void SetParentRow(DataRo...set_Item Method System.Void set_Item(Int32 columnIndex, Object value), System.Void set_Item(...set_ItemArray Method System.Void set_ItemArray(Object[] value)set_RowError Method System.Void set_RowError(String value)ToString Method System.String ToString()Item ParameterizedProperty System.Object Item(Int32 columnIndex) {get;set;}, System.Object Item(String ...Delta Property System.Int32 Delta {get;set;}Processed Property System.Int32 Processed {get;set;}Processed : 1272Delta :
  3. It does not show the variable in the get-member it is simply blank (or non-existing). however when I do the following: invoke-sql -server DBserver -SQL "set nocount ondeclare @xx table(dataflow varchar(50), FLOW_PROCESS_MIN int,FLOW_DELTA int)insert into @xxSELECT top 26 DATAFLOW, FLOW_PROCESS_MIN, FLOW_DELTA FROM DBtable.dbo.DataFlowStats (nolock) ORDER BY AuditTimeStamp DESC UPDATE @xx SET FLOW_DELTA = 0 WHERE dataflow IN ('MQMSGMUREX','MQSEQMUREX')SELECT SUM (FLOW_PROCESS_MIN) as Processed,SUM (FLOW_DELTA) as Delta from @xx" | select Processed, Delta I get all variables Kind regards, Christian
  4. I am trying to also get the delta displayed, what am I doing wrong?$processed = invoke-sql -server DBSERVER -SQL "set nocount ondeclare @xx table(dataflow varchar(50), FLOW_PROCESS_MIN int,FLOW_DELTA int)insert into @xxSELECT top 26 DATAFLOW, FLOW_PROCESS_MIN, FLOW_DELTA FROM DB.dbo.DataFlowStats (nolock) ORDER BY AuditTimeStamp DESC UPDATE @xx SET FLOW_DELTA = 0 WHERE dataflow IN ('MQMSGMUREX','MQSEQMUREX')SELECT SUM (FLOW_PROCESS_MIN) as Processed, SUM (FLOW_DELTA) as Delta from @xx"$obj = new-object System.objectadd-member -inputobject $obj -membertype NoteProperty -Name Processed -value $processed.Processed add-member -inputobject $obj -membertype NoteProperty -Name Delta -value $_.Delta $obj Thanks []
  5. Actually I just found out what to do: I ran the following in the PowerShell Window: add-pssnapin PowerGadgets This did the trick. Thanks chrisitan
  6. Thanks Juan, But I am having issues using the (trial version) PowerGadgets with PS as i keep getting: The term 'out-chart' is not recognized as a cmdlet, function, operable program, or script file. Verify the term and try again. I have reinstalled PS, and PowerGadgets - but still get this am I missing some part of the installation? Kind regards, Christian
  7. Hi I need help getting data to an innergauge, It only seems to hold fixed values, og the same value as the main gauge. thanks :-)
×
×
  • Create New...