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 strongm 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
  • Content: Threads
  • Order by date
  1. 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 =...
  2. 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 =...
  3. 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...
  4. 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...
  5. 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...
  6. peac3

    convert hierarchy structure to parent children pair please...

    Hello SQL legends, I have a table 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...
  7. peac3

    fill the gap of hierarchy data

    Hi, we have a task to validate our hierarchy data and whether there are any gaps in our table and compare it with our source table. The hierarchy that we check is only within our client. our data structure is below we need to identify the gap below is the source table which we need to align...
  8. peac3

    Avoid double counting

    Hi, We have a table containing a hierarchy of data which is account parent and children relationship so 1 parent account would have 1 to many children account. Then we have a flag for whether account balance should be included as part of accounting calculation and the flag called INCL_COUNT...
  9. peac3

    Derive staus date time by aligning start and end datetime

    Hi, I would like to derive the status datetime from joining and aligning start datetime and end datetime from original data as below. APPT_I STUS_C STRT_S END_S 123 APPT 02/10/2023 14:10:31 ? 123 APPT 02/10/2023 14:10:31 09/10/2023 08:00:06 -- take this record 123 DRFR...
  10. peac3

    Gaps and islands

    Hi guys, I have data like below with a list of employees, applications, status and dates. EMPL_I APPT_N STUS_C EFFT_D 123 001 NEW 2023-10-02 123 001 NEW 2023-10-09 123 001 DEFER...
  11. peac3

    split token using regular expression

    Hi, I need to tokenise from a sentence to find action that populated using the real date. Initially in the input table, the column action is populated using template with date called (dd/mm/yyyy). As time goes by, the client may or may not follow the sequence which makes a bit complicated...
  12. peac3

    concatenate join

    Hi all, I need to join from the concatenate column separated by space delimiter. Input Table1 ClientID CityCode 1 2011 2012 2013 2 2011 2012 Table2 (ref table) CityCode CityName 2011 Sydney 2012 Melbourne 2013 Perth After joined 2 tables...
  13. peac3

    select distinct each record

    Hi guys, i have two tables would be joined using ref_n and because ref_n the same, if i joined using ref_n, it would create cartessian join. How would I avoid it by having one auth person each records like example below. table1 post_id ref_n post_d 1 50 2018-10-01 2 50...
  14. peac3

    select distinct most frequent value within date range

    Hello all, I am trying to select distinct clientid, date, location from the the most frequent value of location from each client within the day. For example ClientID Date Location 1 2018-05-01 NY 1 2018-05-01 TOK 1 2018-05-01 HK 1...
  15. peac3

    Merge two historical tables, please help...

    Hello all, I have a question trying to merge two historical tables which the dates are not aligned. I would like to merge the historical company table active start and end date with the most recent address within the date range based on the enddate. example below: Company table CompanyId...
  16. peac3

    Merge records to get sequence in TIME with condition, Please help...

    Hello all, I am trying to extract minimum maximum time from terminal ID until it changes the business according to our flag. 1 = means changing business 0 = same business and I need to merge into one record from multiple records in multiple records in the sequence of time. as per below codes...
  17. peac3

    SQL encryption without DMK

    Hello all, I was trying to implement encryption in my SQL server with Symmetric key and password. from what I understand is in each server, we need to create Database Master Key then Symmetric Key. But what I have found is encryption without DMK works as well as per code below USE DBName...
  18. peac3

    Fill the blank from historical data

    Hi, I have the data needs to be backed fill based on historical data because the data is not consistent (some day it's populated and some day it's not) Below I have two tables (Transaction table and Account_Location table): Transaction - capture daily transaction with account and location...
  19. peac3

    Aggregation data monthly join tables

    Hi all, I am trying to aggregate the transaction data monthly within a year of 2017 from the customer location table then convert from row to column. Please do not use Pivot function as I am not using MSSQL but using database without Pivot function but it does accept SQL. Here is the input...
  20. peac3

    Search String mapping help

    Hi all, I am trying to assign the terminals to the company by searching from the terminal name using search string in the company table. The input from 2 tables: company table and terminal table Company_Table Company_ID Name Search_String 1 PAYPAL '%PAYPAL%','%PAYPAL%ATM%' 2 JETSTAR...

Part and Inventory Search

Back
Top