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 =...
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 =...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.