m 01.12.2011 10:23, schrieb ibmcom2011:
> > Suppose a table like below:
> >
> > CREATE TABLE T1(
> > F1 varchar(20),
> > V1 integer
> > );
> >
> > Now, it has some values in like these:
> >
> > insert into t1(f1, v1) values(a1,
Suppose a table like below:
CREATE TABLE T1(
F1 varchar(20),
V1 integer
);
Now, it has some values in like these:
insert into t1(f1, v1) values(a1, 20);
insert into t1(f1, v1) values(a2, 5);
insert into t1(f1, v1) values(a3, 3);
insert into t1(f1, v1) values(a12, 12);
insert into t1(f1,
Helen,
I created a view as you said.
CREATE OR ALTER VIEW V_T_BALANCE(
F_ACD_ID,
NUM1,
NUM2,
BALANCE)
AS
select F_ACD_ID, NUM1, NUM2, BALANCE from FIN_ACC_CASH_DIARY
where 1 = 1
with check option
;
Then create a trigger for the view:
CREATE OR ALTER TRIGGER V_T_BALANCE_AUD0
heLen,
Thanks.
I found I should add a "with check option" to the end of a updatable view in
the introduction of FB2.0. Now my FB version is 2.5.
But the option requires a where sub-clause, and I don't know how to do.
And Now, I have a suppose on my trigger. For the Column YE is not be updated
Sorry.
The description is a part of my trigger, some infomation was omitted.
Originally, I want to explain it simply, but difficult to see.
The trigger is a After Update & Delete trigger.
TABLE1 structure (show simply)
ID -- Num1 -- Num2 - BALANCE
1 --- 15 -
Hi,
I try to update a column value in a trigger after updating a row, but it raises
a error of too many concurrent execution of the same request.
I know this is caused by recursion, but I can't avoid it.
I want update a column value of all the rows which is after the updating rows.
ID --
Hi,
I try to update a column value in a trigger after updating a row, but it raises
a error of too many concurrent execution of the same request.
I know this is caused by recursion, but I can't avoid it.
I want update a column value of all the rows which is after the updating rows.
ID -
I want to transpose rows and columns for some dubious row-value in a
store-procedure:
for example, the table seems like this below:
Products_NameNumber
A 12
B 24
C 35
A 5
-- to
A B C
17 24 35
Now, the products_name is dubious, but the
te-compiled, every time X is altered).
> If that doesn't help, send more details.
>
> regards
> Tomasz
>
> On 2011-11-22 09:15, ibmcom2011 wrote:
> > hi, all,
> >
> > in a store procedure, i try to insert into a table some records from an
> > other store
f (all procedures depending on X should
> be altered, that is, byte-compiled, every time X is altered).
> If that doesn't help, send more details.
>
> regards
> Tomasz
>
> On 2011-11-22 09:15, ibmcom2011 wrote:
> > hi, all,
> >
> > in a store procedure,
hi, all,
in a store procedure, i try to insert into a table some records from an other
store procedure, it seems like this:
create procedure test1
as
begin
insert into table1(f1, f2, f3)
select fa, fb, fc from test2(param1, param2);
end
test2 is a store procedure defined in the same dat
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
wrote:
>
> >> select f1, f2, f3 from t1
> >>where f1 = 'xxx'
> >> union
> >> select 0, 0, 0 from rdb$database
> >> where not exists(
> >> select f1, f2, f3 from t1
> >>where f1 = 'xxx')
> >> union
> >> select f3, f4, f5 fr
--- In firebird-support@yahoogroups.com, Svein Erling Tysvær
wrote:
>
> >i want to union a query A to an other query B, if no any record in a,
> >then automatically switch the 3rd query C to union the B. otherwise,
> >the A can union to B.
> >
> >now i try to do it such as:
> >
> >select 0, 0
i want to union a query A to an other query B, if no any record in a, then
automatically switch the 3rd query C to union the B. otherwise, the A can union
to B.
now i try to do it such as:
select 0, 0, 0 from t1 /* C */
where not exists(
select f1, f2, f3 from t1
where f1 = 'x
i want to union a query A to an other query B, if no any record in a, then
automatically switch the 3rd query C to union the B. otherwise, the A can union
to B.
now i try to do it such as:
select 0, 0, 0 from t1 /* C */
where not exists(
select f1, f2, f3 from t1
where f1 = 'x
--- In firebird-support@yahoogroups.com, Mark Rotteveel wrote:
>
> On Sun, 23 Oct 2011 21:23:20 -0500, Gordon Niessen
> wrote:
> >> The following query should work:
> >> SELECT f1, LIST(f2) FROM table GROUP BY f1
> >>
> >> Be aware that there is no defined order for the result of LIST.
> >>
> >
now i have a table such as:
f1 f2
1aa
2tf
1bb
3cc
2ht
i want the result seems as:
f1 f2
1aa, bb
2tf, ht
3cc
any help is appreciated, thanks.
17 matches
Mail list logo