Subject | some SQL Question |
---|---|
Author | Richard Drent |
Post date | 2003-10-30T08:36:36Z |
Hi all
Im now working with firebird for a weak or two, and Now im at an intresting
part of the database..... triggers...
And I can't succeed getting this right.
Table 1
OPTICIAN
ID,
NAME,
CATEGORY_ID
Table 2
SALES
ID,
OPTICIAN_ID,
CATEGORY_ID
I would like after insert on SALES
Select category_id from OPTICIAN where ID = x
Update SALES set CATEGORY_ID = (selected category_id)
Thus anyone have segestions.
Greetz
Richard Drent
Im now working with firebird for a weak or two, and Now im at an intresting
part of the database..... triggers...
And I can't succeed getting this right.
Table 1
OPTICIAN
ID,
NAME,
CATEGORY_ID
Table 2
SALES
ID,
OPTICIAN_ID,
CATEGORY_ID
I would like after insert on SALES
Select category_id from OPTICIAN where ID = x
Update SALES set CATEGORY_ID = (selected category_id)
Thus anyone have segestions.
Greetz
Richard Drent