Skip to content

Powershell sorting columns

I was able to sort the column and remove duplicates using -Unique My problem is that I can’t remove a specific row using the status property ID Name Status 1 John Current 1 John Future 2 Mary Future 2 Mary Notice 3 Paul Future I want the rows to be unique by status order. Current Notice Future Example: …

Order by 2 columns with case

I have a query that searches for user in 2 colums firstUser and secondUser and orders them by first and last name: But this first orders the cases when user is at first user then it orders the case when user is secondUser. Is ther a way to order the whole data by first name and last name no matter

Hive Union of two queries is giving compile error

I am not sure what is wrong with following hive query. However, it’s throwing error. I am able to run this queries individually. However, facing issues while running with union Error Answer Hive versions prior to 1.2.0 only support UNION ALL Workaround: Use UNION ALL instead of UNION, wrap all into subq…

Apply column filter on summed columns in DB2

I have the following DB2 table: COLUMN_NAME DATA_TYPE TYPE_NAME COLUMN_SIZE COLUMN_TEXT DMPROD -2 CHAR () FOR BIT DATA 35 Product Code DMPTYP -2 CHAR () FOR BIT DATA 1 Period Type DMTYPE -2 CHAR () FOR BIT DATA 6 Type of Data DMVL01 3 DECIMAL 17 Value Period 1 DMVL02 3 DECIMAL 17 Value Period 2 DMVL03 3 DECIM…