This is a multi-part message in MIME format.
------=_NextPart_000_0007_01C2321F.AC4B0D90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit
-----Original Message-----
From: Ali Karimi [mailto:a97alika@s...]
Sent: Monday, July 22, 2002 8:48 PM
To: sql language
Subject: [sql_language] SV: RE: SV: RE: SV: SV: RE: SV:
Hi,
> Table B detail is fix cannot be changed, the purpose is for conversion
calculation
Ok.. now its easier to understand :o) Then, there is no use in setting
up a Trigger on
Table_B. If a Trigger is the solution for this problem then it should be
on Tabel_A.
> Only the item have a 'kg' conversion necessary.
So, for each row in Table_A, no matter what type of Item, you will
compare the
Table_A.uom with Table_B.uom1 or Table_B.uom2. Is that correct?
Answer : Yes.
One more question (did not get an answer on this on the previous msg):
Once you change the value of qty, for a specific row, in Table_A will it
stay
that way or is it possible that the same row, with the already changed
qty, will be
changed again?
Ex.
Table A (after conversion)
Item uom qty
ItemA bag 500(kg)
itemB carton 0.6667(kg)
ItemC piece 30(piece)
Is it possible for ItemA (with the qty 500) and ItemB (with the qty
0.6667) to change again
or once they are changed they will never be changed again?
Answer: Once the qty had changed to 'kg' qty, it not needs
to change again.
Anyway, i do not think that this should be any problem to solve!
Because of the "static" (fixed) property of Table_B, you need only to
concentrate on Table_A and each time a new row is inserted.
Each time that happens you can check for the matching column in Table_B,
and do
the changes (the conversion).
BUT it seems, by your explanation, that there might already be
tupples/rows stored in
Table_A that need to be changed (this is where one of my questions
arise; if its possible
(or it should be able) to change the value of qty once it have been
changed before).
That can be done manually before you start to use the Trigger on the
table.
Anyway, i hope to get a feedback on this (as soon as possible :o)) so we
can solve this
and feel proud ;o)
Regards
/ Ali
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to