Hello,
i got a question about:
i got a tableworkitem; with folowing fields:
fields
id, contact_id, comments, portimaid, title, ,officeid,...
example data
1 , 22 , blabla , 2222 , Ticket:Open;2222;bl,1234,.....
trigger on my table
CREATE TRIGGER [testeke] ON [dbo].[workitem]
FOR INSERT, UPDATE
AS
UPDATE workitem
SET portimaid = SUBSTRING(title, 36, 6)
===========>the portimaid is a part of the title formed with the
function substring
what i want:
First thing------------------------------
i want that is possible to update an existing record,
for example the folowwing record for my table workitem:
contact_id, comments, portimaid, title, ,officeid,...
22 , lalalala , 2222 , Ticket:Update;2222;bl,1234,.....
like you can see the portimaid is the same (2222) AND in the title he needs to detect Update
So he needs to update the existing record (with the unique portimaid(2222))
and just add the commments (wich is lalalala) on the existing comment (blablabla), the rest of the record he need to ignore
Second thing---------------------------------------
IF not all this above conditions he just need to add a new record in my workitem database
My question is this a realistic thought or can i solve this otherwise?
Anybody has ideas?
Many Thanks
Steve
i got a question about:
i got a tableworkitem; with folowing fields:
fields
id, contact_id, comments, portimaid, title, ,officeid,...
example data
1 , 22 , blabla , 2222 , Ticket:Open;2222;bl,1234,.....
trigger on my table
CREATE TRIGGER [testeke] ON [dbo].[workitem]
FOR INSERT, UPDATE
AS
UPDATE workitem
SET portimaid = SUBSTRING(title, 36, 6)
===========>the portimaid is a part of the title formed with the
function substring
what i want:
First thing------------------------------
i want that is possible to update an existing record,
for example the folowwing record for my table workitem:
contact_id, comments, portimaid, title, ,officeid,...
22 , lalalala , 2222 , Ticket:Update;2222;bl,1234,.....
like you can see the portimaid is the same (2222) AND in the title he needs to detect Update
So he needs to update the existing record (with the unique portimaid(2222))
and just add the commments (wich is lalalala) on the existing comment (blablabla), the rest of the record he need to ignore
Second thing---------------------------------------
IF not all this above conditions he just need to add a new record in my workitem database
My question is this a realistic thought or can i solve this otherwise?
Anybody has ideas?
Many Thanks
Steve