- Posts: 736
- Thank you received: 16
Dynamic Column name
- hanisultan
-
Topic Author
- Offline
- Platinum Member
-
Less
More
1 month 4 hours ago #22952
by hanisultan
Dynamic Column name was created by hanisultan
Hello,
What I'm trying to do is update an excel sheet - there is a column which I can use to match the values, in the case column Deposits and if the value matches, then I will update the date field based on previous date - AS you can see in the screen shot. I can create the column name dynamically using dynamic SQL but would the tool adjust each day when the date changes and match it to the correct date? Also, would I be able to insert the values based on what deposits are matching ( not sure how to phrase it) and if so how do I do that? If not my other options is order the fields in both the excel and the script and hope the values go in the correct fields? As always, thank you for your help.
What I'm trying to do is update an excel sheet - there is a column which I can use to match the values, in the case column Deposits and if the value matches, then I will update the date field based on previous date - AS you can see in the screen shot. I can create the column name dynamically using dynamic SQL but would the tool adjust each day when the date changes and match it to the correct date? Also, would I be able to insert the values based on what deposits are matching ( not sure how to phrase it) and if so how do I do that? If not my other options is order the fields in both the excel and the script and hope the values go in the correct fields? As always, thank you for your help.
Please Log in or Create an account to join the conversation.
- Peter.Jonson
-
- Offline
- Platinum Member
-
4 weeks 2 days ago #22953
by Peter.Jonson
Peter Jonson
ETL Developer
Replied by Peter.Jonson on topic Dynamic Column name
Good morning
Thank you for using the support forum
Let me check my understanding.
You have two input fields deposit value and deposit date.
If the deposit date matches any of the "date output fields" you want the deposit value to go into this "date output field"
Is this correct?
Thank you for using the support forum
Let me check my understanding.
You have two input fields deposit value and deposit date.
If the deposit date matches any of the "date output fields" you want the deposit value to go into this "date output field"
Is this correct?
Peter Jonson
ETL Developer
Please Log in or Create an account to join the conversation.
- hanisultan
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 736
- Thank you received: 16
4 weeks 2 days ago - 4 weeks 2 days ago #22954
by hanisultan
Replied by hanisultan on topic Dynamic Column name
Actually, the naming is bad here. I'll have to input columns, deposits and a date going into an excel sheet tab. The output is multiple columns, one of the deposits and the other is a date. The deposits columns in both the input and output are for matching purpose, no insertion. wherever they match then the date column from the input should be inserting the values in the corresponding date from the output fields. I think the auto-link option should do it but not sure? Also, I want to insert the data into an excel sheet in the column where the dates match see attached - so the insertion will start at row 7 under the column where the date matches
Last edit: 4 weeks 2 days ago by hanisultan.
Please Log in or Create an account to join the conversation.
- Peter.Jonson
-
- Offline
- Platinum Member
-
4 weeks 2 days ago #22955
by Peter.Jonson
Peter Jonson
ETL Developer
Replied by Peter.Jonson on topic Dynamic Column name
Can we ask you to provide us with an Excel file example with two sheets?
Source data
Desired result
We will then create a working example for you.
Source data
Desired result
We will then create a working example for you.
Peter Jonson
ETL Developer
Please Log in or Create an account to join the conversation.
- Peter.Jonson
-
- Offline
- Platinum Member
-
4 weeks 2 days ago - 4 weeks 2 days ago #22956
by Peter.Jonson
Peter Jonson
ETL Developer
Replied by Peter.Jonson on topic Dynamic Column name
Thank you for providing the files
They helped us to understand what you are trying to achieve.
Please see the attached working example
Screenshots
They helped us to understand what you are trying to achieve.
Please see the attached working example
Screenshots
Peter Jonson
ETL Developer
Last edit: 4 weeks 2 days ago by Peter.Jonson.
Please Log in or Create an account to join the conversation.
- hanisultan
-
Topic Author
- Offline
- Platinum Member
-
Less
More
- Posts: 736
- Thank you received: 16
4 weeks 2 days ago #22957
by hanisultan
Replied by hanisultan on topic Dynamic Column name
Thank you for this but it is not working. If I run it, nothing gets inserted into the field. If I run it with the output file that I downloaded from here, it shows the data there first but after running it, it disappear. Also, I guess I have to manually type all the dates even though there will only be one date that will actually match? The client will be running this script every quarter for multiple tabs so I guys I would have to have a transformation for each quarter.
Please Log in or Create an account to join the conversation.