[sqlite] Trigger help or how to update id based on column content

2015-02-18 Thread Jose I. Cabrera
Greetings! I have this table CREATE TABLE LSOpenJobs ( id integer primary key, ProjID integer, PSubClass, lang, ProjFund, RateType ); Imagine this set of records... 171421|132959|DOC-Trans|DE-DE|860.69|PER-WORD 171422|132959|DOC-Trans|ES-LA|624.96|PER-WORD

[sqlite] Trigger help or how to update id based on column content

2015-02-18 Thread jose i cabrera
On 2/18/2015 6:48 PM, Igor Tandetnik wrote: > On 2/18/2015 5:10 PM, jose i cabrera wrote: >> So, in reality, all the tasks of the project of >> like "lang" minus the PM, have to be added and 10% of that total be >> calculated to the (on this instance) DE-DE PM task. > > UPDATE LSOpenJobs SET

[sqlite] Trigger help or how to update id based on column content

2015-02-18 Thread Igor Tandetnik
On 2/18/2015 5:10 PM, jose i cabrera wrote: > So, in reality, all the tasks of the project of > like "lang" minus the PM, have to be added and 10% of that total be > calculated to the (on this instance) DE-DE PM task. UPDATE LSOpenJobs SET ProjFund = ( SELECT round(sum(t2.ProjFund) *

[sqlite] Trigger help or how to update id based on column content

2015-02-18 Thread jose i cabrera
On 2/18/2015 4:37 PM, Igor Tandetnik wrote: > On 2/18/2015 4:19 PM, jose i cabrera wrote: >> I need to know what the percentage for this specific project ID, 132959, >> and language is going to be calculated. This may be different depending >> on the project. So, it may be 3%, 5%, 10%, 20%, 25%,

[sqlite] Trigger help or how to update id based on column content

2015-02-18 Thread Igor Tandetnik
On 2/18/2015 4:19 PM, jose i cabrera wrote: > I need to know what the percentage for this specific project ID, 132959, > and language is going to be calculated. This may be different depending > on the project. So, it may be 3%, 5%, 10%, 20%, 25%, etc. That is my > problem, I don't know how to

[sqlite] Trigger help or how to update id based on column content

2015-02-18 Thread jose i cabrera
On 2/18/2015 3:59 PM, Igor Tandetnik wrote: > On 2/18/2015 2:36 PM, Jose I. Cabrera wrote: >> these are my two steps: >> 1. SELECT RateType FROM LSOpenJobs WHERE ProjID=132959 AND >> PSubClass='PM' AND lang='DE-DE'; > > What is the point of this step? I don't see where and how the value > you

[sqlite] Trigger help or how to update id based on column content

2015-02-18 Thread Igor Tandetnik
On 2/18/2015 2:36 PM, Jose I. Cabrera wrote: > these are my two steps: > 1. SELECT RateType FROM LSOpenJobs WHERE ProjID=132959 AND PSubClass='PM' AND > lang='DE-DE'; What is the point of this step? I don't see where and how the value you obtain therefrom is required for step 2. > 2. Use the