Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: peac3
  • Order by date
  1. peac3

    split one row into multiple rows... help pls

    Hi mikrom, our environment is Windows environment hence .Net/C# would be the native language. Last time you gave us the c# solution I believe this time you can do it again :) I will try gmmatros solution.
  2. peac3

    Unmerged single records into multiple records

    Hello C# gurus, I am trying to split some of the data from one row into multiple rows with conditions. in the data set, the original value of ActionType could be Changed, Added, or deleted. The conditions of change are: If ActionType = Changed, we must split it into 2 rows: ActionType =...
  3. peac3

    split one row into multiple rows... help pls

    Hey Mikrom, Do you mind showing the codes, I have put the thread on the other forum. Hi Chris, In a simple explanation, There are 2 datasets we need to match, dataset1 (the unmerged version) and dataset2 (the merged version). Initially, I thought it would be better to match both datasets in a...
  4. peac3

    split one row into multiple rows... help pls

    Hi Chris, This is the other way around of the approach. Previously, we would have liked to merge the original data and then match it with the other table. but merging the data has a data quality issue hence we thought it would be better for another table to split than match with the original...
  5. peac3

    split one row into multiple rows... help pls

    Hello SQL gurus, I am trying to split some of the data from one row into multiple rows with conditions. in the data set, the original value of ActionType could be Changed, Added, or deleted. The condition of changes are: If ActionType = Changed, we must split it into 2 rows : ActionType =...
  6. peac3

    Consolidate multiple rows into single row

    Hi SQL guru, We are trying to locate the client information that has been changed. However, in our historical dataset, the change definition is deleted record and added record Hence the original dataset is as below: RowNumber ParentID ChildID IdentityCode ActionType Date 1 ABC...
  7. peac3

    Convert data structure

    I know, but I need to keep that flag because the company name may be the parents in different families and that flag is to dedup which one is the right ClientID. I think I have found a solution by comparing it with the previous name...
  8. peac3

    Convert data structure

    Hi Mikrom, We need some little enhancement in your codes. if there was some not duplicated value after the duplicated, it should be the parents the one right above it, not the one with Manual Flag = 'y' As per below example Data like below ROW_N FamilyID CompanyName HierarchyLevel ClientID...
  9. peac3

    close teradata connection session to dispose volatile tables

    yeah, I do close the session in C# but it doesn't drop the volatile tables that's the problem
  10. peac3

    close teradata connection session to dispose volatile tables

    Hello mikrom, I am using drop tables as a workaround but we use quite number of volatile tables hence the codes look a bit messy. In other language, we drop volatile tables by closing the session which looks simpler and more elegant 😊
  11. peac3

    close teradata connection session to dispose volatile tables

    Hi, I have simple c# codes as below about executing the creation of some volatile tables in Teradata. In Teradata, Volatile tables only remain within a session hence I would like to dispose of them to clear up memory before creating other volatile tables. using (var connection = new...
  12. peac3

    Convert data structure

    Fantastic, you are such a legend. I tried for a few companies, it works... let me try it with hundreds thousands of companies
  13. peac3

    Convert data structure

    Sorry mikrom, I was throwing a solution after I was talking to my stakeholders and yesterday tek-tips was down. No, the basic data structure does not change. I just need to merge my reference table into the main table. Hence to handle duplicate names, I just need to replace the column MatchRank...
  14. peac3

    Convert data structure

    Thanks Mikrom, You are such a legend! After discussion with our stakeholders, if the client names are duplicated, they do not want to pick based on the biggest deal only (match rank), there are other considerations. Hence solution-wise, I will build a web front end for them to cherry-pick...
  15. peac3

    Convert data structure

    Correct, but I am not quite sure whether I understand your logic codingly, pseudo-code or example would be nice :)
  16. peac3

    Convert data structure

    Sorry mikrom, it was like Sunday after midnight when I typed this, so it has some typos. We just received a new data set to handle duplicate company names. In that case, they rank it for us to identify the client who has the biggest deal amount and flag it in MatchRank. With match rank, then we...
  17. peac3

    Convert data structure

    Hi Mikrom, I just realised the CLIENTID can be duplicated as the company name could be similar, we need to show the duplication in the child. But when we choose the parent, we need to dedup it by the highest match rank. For example below ROW_N FamilyID CompanyName HierarchyLevel ClientID...
  18. peac3

    Convert data structure

    Excellent, you are such a legend. Quick question, why are you not sorting it by ROW_N or is it already by default?
  19. peac3

    Convert data structure

    Hi Mikrom, Great script, can you show me the output of this, please? if good, I would replicate this logic in c#/python. I write awk as well but this is in windows ecosystem hence I would choose c# Thanks,
  20. peac3

    Convert data structure

    Hello C# legends, I have raw data with a family structure vertical as below ROW_N FamilyID CompanyName HierarchyLevel ClientID 1 A XX1 0 A1 2 A XX2 1 A12 3 A XX3 2 A345 4 A XX4...

Part and Inventory Search

Back
Top