You are here: Re: trigger question « MsSQL Server « IT news, forums, messages
Re: trigger question

Posted by Zvonko on 10/02/49 11:51

"Erland Sommarskog" <esquel@sommarskog.se> wrote in message
news:Xns97EF7B82C2C9Yazorman@127.0.0.1...
> Zvonko (zvonko_NOSPAM_@velkat.net) writes:
>> I have a interesting problem. I need to write a trigger that wil go
>> off after every sixth row is inserted/updated.
>
> That is not really possible. For starters, a trigger fires once per
> statement, so what if you insert 35 rows in one go?
>
> I think you need to reformulate the requirement. What do you really
> want to achieve?

I realised that this can not be done with trigger. Here is the deal. For one
item you have six rows with different values for column optzalpak. I have to
insert all six rows and then get SUM(optzalpak) for that particular item and
update all six rows with it. And then another six rows for second item.

I did it programatically (Java) but it takes too long to be done, so I am
wondering if I can let the SQL server do the dirty work.


Thanks,
Zvonko

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация