Hi, sorry i havnt been in contact sooner, i had issues replying with Just Answer they took 48 hours to fix it.
Anyway i had a look into how a DML trigger works and that figured out how to make it work.
In the same DML trigger i am trying to update column (PL1) with another calculation, however SQL doesnt like it and im not sure why? Could you please take a look.
Ok sorry it doesn't make sense, this is why i am asking an expert because i don't know myself! You may need to bear with me..
Perhaps lets start again..
What i am ultimately trying to achieve in table 'COA' is to calculate a total sales volume for the year by account and then calculate a monthly value using a sales curve from the date table.
I have attached an example which i am hoping explains things more clearly.
Hoping you can provide some code to make it work.
If you need more info to assist please let me know.
Basically this is the only way i've managed to get it to work.
I've attached a simplified version focusing only on the Sales Volume, if this part can incorporate the sales curve by month then i can apply it elsewhere.
Overview: In the attached file
Tab 1 - Pivot table output
Tab 2 - Database table data (JA wouldn't allow me to upload the SQL database so i have include the data here)
1. 'COA' - holds account/product info
2. 'Date' - date plus associated date driven data for calcs eg. Sales Curve
3. 'Plann' - holds assumption data used in calculations.
Tab 3 - Trigger query
This is associated with the 'Plann' table - The purpose of the query is to auto update table 'COA' column 'PL' driven by assumptions in table 'Plann'. In my version of excel i have an addin that allows sql table data to be changed in an excel worksheet.
If you have a more efficient way of coding it would be very much appreciated.
If anything isn't clear please let me know.
It seems the professional has left this conversation. This happens occasionally, and it's usually because the professional thinks that someone else might be a better match for your question. I've been working hard to find a new professional to assist you with your question, but sometimes finding the right professional can take a little longer than expected.
I wonder whether you're OK with continuing to wait for an answer. If you are, please let me know and I will continue my search. If not, feel free to let me know and I will cancel this question for you.
Thanks for your patience,
Thanks for getting back to me.
We will continue to look for a Professional to assist you.
Thank you for your patience,
I apologize as we have not yet been able to find a Professional to assist you. Do you wish for me to continue to search for someone to assist you or would you like for us to close your question at this time?
Please persist for the time being.
Please understand it is rare for us not to be able to find the right Professional to assist our customers. We can close this question and return your good faith deposit to the original funding source on request.
Please let me know how you wish to proceed and again I apologize for any inconvenience this may have caused.
I hope you will give JustAnswer a try again in the future,
Hi, the good faith deposit of £3 and the £28 has gone from my account, can you please reimburse both amounts and close the ticket.