Select trim(RC.RDB$INDEX_NAME)
from RDB$RELATION_CONSTRAINTS RC
where (RC.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY') and
(RC.RDB$RELATION_NAME = :TABELA)
into :PKTEMP
Using that select you can fiind the name of the column who has the primary
key.
Inspired from Carlos Cantu external log proced
Select trim(I.RDB$FIELD_NAME)
from RDB$RELATION_CONSTRAINTS RC
join RDB$INDEX_SEGMENTS I on (I.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
join RDB$INDICES IDX on (IDX.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
where (RC.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY') and
(RC.RDB$RELATION
Manyou shlould read a bit more before going on this road. It a simple
example of select with group option.
Select TRANS_DATE,TRANSTIME, POSNUMBER, TRANSNUMBER, Count(ITEM_QTY) as
ItemsSold, SUM(LINE_TOTAL) as LineTotal from accounthistory "
WHERE TRANS_DATE BETWEEN '" & StartDate & "' AND
Round(100/15.00) * 15
Or
(div(100,15)*15) + (cast((mod(100,15)/15.00) as Integer)*15)
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of checkmail
Sent: Tuesday, April 8, 2014 8:55 AM
To: firebird-support@yahoogroups.com
Subject: AW:
Update table set column = Mod(column+1,2) where id = :id
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Mark Rotteveel
Sent: Wednesday, April 2, 2014 10:16 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] toggle betweenn 0
in a table
:sql=replace(:sql,':lcIdContract',:lcIdContract);
:sql=replace(:sql,':lcIdRamura',:lcIdRamura);
...
On Tuesday, March 4, 2014 12:24 PM, Bogdan Mihalache
wrote:
I have this Sql statement strored in a table :
Select sum(secunde_fact) as cantitat
Meanwhile i have found that link, but i was wondering if there is a way to
pass the parameters in a variable or something like that.
I have made a new fiels in the table that stores the sql statement, and put
in there the variables like this :
- lcIdContract := :lcIdContract, lcIdRamura
Execute Statement Sql Into :lnCantitate ;
If i remove the variables(:lcIdContract, :lcIdRamura, etc.) from the sql
statement, that is stored in the table, it`s working, but I really need to
keep them, and keep the sql in the table. Does anyone has a solution to my
problem?
Bogdan MIHALACHE
Why don`t you use CAST ( var as VARCHAR(NN)) ?
Bogdan MIHALACHE
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of liviuslivius
Sent: Friday, January 31, 2014 10:22 AM
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Udf
Select * from TABLE_A aa where Exists (Select ab.id From table_b ab And
ab.data_b = 100 And aa.id = ab.id)
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of peter_...@yahoo.com
Sent: Monday, December 16, 2013 12:41 PM
To: firebird-support@yahoogroup
<> ?
That question mark represents an variable. My question is from witch table I
can extract the value and the name of that variable? It is possible?
Thank you for your kind help!
Bogdan MIHALACHE
...@poczta.onet.pl
Sent: Thursday, October 10, 2013 5:22 PM
To: firebird-support@yahoogroups.com
Subject: Odp: [firebird-support] Firebird seminar in Prague, November 25, 2013
Hi,
Read once again ;)
Firebird semi in PRAGUE
Regards,
Karol Bieniaszewski
- Reply message -
Od: "Bogdan Miha
And where exactly can we found a list of all countries of the tour? So i can
find a close to mine and maybe join the seminary?
I`ve searched the websites bellow and could not find anything like.
Thank you!
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.co
if(new.field_b>0) and new.field_a = old.field_a then
dosomething;
else
dosomethingelse;
Original message
From: "Dr. Fabrizio Villanova"
Date:
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Update query and trigger
hi all,
for example:
mytabl
14 matches
Mail list logo