Capture Exception Messages Is there a way to capture an exception message within a stored procedure? I want to capture any exception message and save it to a column in a record.
-- Patrick Moloney
| | 7 | 62 | 3/12/2008 6:41:53 PM |
Sum two tables with HAVING I would like to get sums from two tables like this:
select t1.id, t1.description, (select sum(t2.amount) from t2 where t2.id = t1.id) as sum1, (select sum(t3.amount) from | | 1 | 62 | 3/10/2008 8:36:42 AM |
Is this safe? Hi,
I need to write some SQL to flip the values in a table or two. Here's an example of what I want to do. It works, but I'm not sure if it's safe. All of our users are using Inter | | 2 | 56 | 3/7/2008 11:44:47 PM |
Trigger do not fire situations Hi ! I have a trigger after update wich fire a stored procedure execution. If I make the update from IBConsole the trigger fire. From an IBX IBSQL component ... nothing. Transactions a | | 4 | 65 | 3/7/2008 12:55:01 PM |
Error with Subquery and Group By With following query after added last column subquery, I get error : Invalid token. Dynamic SQL Error. SQL error code = -104. invalid column reference.
select a.o_csoc, a | | 4 | 86 | 3/7/2008 8:52:46 AM |
Update IB 6,02
Uprice Field=Numeric(15,2) Table UPrice Value= 100,50
SqlQuery.Sql.Text:='Update Parts Set Uprice='+OrdDetUPrice......(?)
cause of UPrice value=100,50 ( interbas | | 1 | 51 | 3/6/2008 1:43:40 PM |
Change a field name that is a reserved word I am converting an Interbase 5.6 database that contains column names that are reserved words in IB2007. It was backed up in IB5.6 and restored into IB2007 with no problem. If I use IBConsole a | | 7 | 80 | 3/3/2008 3:53:18 PM |
Smart indexes IB 7.5.1
How to make smart indexes for this query? My problem is that I whant good a index for the join itself and the criteria at the same time.
Mikael
Select | | 1 | 59 | 3/3/2008 11:58:21 AM |
double quotes in value clauses
i delphi i create sql statements on the fly to insert etc i have found problems when data inclueds a double quote messes up the sql
cant remember but there must be a way of using | | 6 | 82 | 2/27/2008 3:53:23 PM |
Aggregating two tables I have two identical tables (A and B), and I want a SELECT to show the difference of two respective SUMs:
SELECT SUM(A.a)-SUM(B.b)
for an ID that is the same for both tables.
| | 1 | 65 | 2/26/2008 5:02:51 AM |
Store Procedure and IN Hi
Select * From MyView Where foo1 = foo2 and foo3 = foo4 and foo5 = foo6 or ID in (Select ID From MyTable Where f1 = f2);
With the above statement the speed is a | | 10 | 92 | 2/23/2008 9:10:18 AM |
See Event Posted With Interbase 2007, I have Post_event in some triggers, can I see anywhere in IB events posted ?
Thanks Adalberto Baldini
| | 1 | 61 | 2/17/2008 5:54:48 PM |
Help with a join.,.. I have 2 tables, basically the same structure....the important fields are the ones that are named the same.
Table 1 ID, Visit, A,b,c.......
Table 2 ID, Visit, a,g,f.....< | | 3 | 62 | 2/15/2008 3:28:57 PM |
Help with plan changing inner to left join problem .. Hi
i have this plan
SELECT H.*, A.DT FROM HIST_DB H INNER JOIN ADRESY_DB A ON H.ID_OBJ=A.ID PLAN JOIN (H ORDER IXA_HIST_DB__DATAP__CZASP, A INDEX (PK_ADRESY_DB__I | | 0 | 55 | 2/15/2008 11:04:53 AM |
Joining stored procs in a query gives different results in IB 2007 and IB 7 .5 I entered this report into QC a few days ago (57839). No comments have been made there yet so I thought I would like to here from you guys here in the NG. Any comments on this? This change i | | 3 | 44 | 2/12/2008 8:42:56 AM |
Speed with Procedure Only to understand query speed with Procedure, If I
CREATE PROCEDURE Proc_1 returns ( cod1 varchar(10), cod2 smallint, cod3 smallint) as begin for Select cod1, cod | | 1 | 59 | 2/7/2008 2:42:57 PM |
Extreamly cpu intensive query Environment. IB 7.5.1 It takes almost 25% cpu on a 4 processor machine with licens for 2 processors. 1.Can someone explain why? 2. Can this sql be done in another way?
Withi | | 3 | 62 | 1/29/2008 2:48:58 PM |
Read which UDFs are installed Hallo,
is there a way to read (perhaprs via metatable) which UDFs are installed in a database?
Thanks
Stefan
--
| | 1 | 49 | 1/22/2008 10:42:49 AM |
Update IB2007
Table-1 ID Value ----------------- AA 1 BB 2 CC 3 DD 4
Table-2 ID Value ----------------- AA | | 1 | 61 | 1/4/2008 4:56:58 PM |
group by cast datetime as integer? Trying to solve the following problem. I have quite a large table with 2 fields, a unique field with integer number, call this F1 and a field with datetime values, call this F2. Both | | 4 | 67 | 12/19/2007 12:53:18 PM |
Foreign key & User defined Index Difference
Hi, I want to ask only the difference between user defined index & the index that created while defining the foreign key. I have two table emp_master & empl_details.The primar | | 7 | 63 | 12/7/2007 10:56:18 AM |
How to use rand() function? I want to use rand() function to get a random row from a FORTUNE table. The function description tell me:"Note the random number generator is seeded using the current time." Why I al | | 3 | 61 | 12/7/2007 2:24:24 AM |
Deal with a field called ACTION We have a large table that holds audit data for a medical database. Unfortunately the field that holds the value for the action taken (update, insert, delete etc.) was called ACTION. As t | | 10 | 60 | 12/6/2007 11:13:28 AM |
Performance issue of group by clause.
Dear, I have one table "trans_acc" like
trans_ trans acc_name dr_amt cr_amt acc_id _id 1 1 A 10 0 2 1 B 0 20
| | 1 | 71 | 11/29/2007 1:18:57 PM |
Date matching for better performance.
Dear, I have one column trans_date of DATE type.How should I match trans_date column? e.g If I want to match 01-April-2007 then by which data retrive fast.
WHERE tr | | 1 | 72 | 11/25/2007 2:08:43 PM |
How to select records not present in either two similar tables In my IB db I've two big employees tables whith the same structure and keys. I need to create a query to select the employees present in the first table that are not present in the second | | 5 | 47 | 11/25/2007 1:53:40 PM |
Queries regarding Interbase
We have come across some technical issues with interbase, which I think are important from the point of view of our application. I am listing them as follows :
1) Rounding : Our | | 1 | 59 | 11/22/2007 2:11:47 PM |
Update IB 6,5
Isnt it possible something like below
UPDATE T1 SET (F1, F2, F3, F4 ) SELECT F1, F2, F3, F4 FROM T2
Thank you.
| | 1 | 51 | 11/21/2007 11:12:03 PM |
loss record for join not found I have table FIOPEDOC with these records :
OPE DOC_1 DOC_2 001 FTS (DOC_1 = '' it is not null) 058 FTA 071 CGE CGA 071 FTA | | 5 | 63 | 11/21/2007 3:51:39 PM |
SUM() problem! Hello, I have problem with SUM() function in Firebird 1.5.4
Please help! Total rows in table is 1 000 000, sumed rows is: 3934
SELECT SUM( N_ST ) FROM T_NALI WHERE C_NOM | | 2 | 68 | 11/21/2007 10:56:38 AM |
sum month by month Dear Sir
I have a table with 3 fields name , price and date (DD/MM/YYYY)
Now i want to sum month by month for all the year separetly How can i do? Please write the code < | | 0 | 55 | 11/21/2007 5:50:22 AM |
Extract use Dear Sir
Can you tell me how i use the Extract in a Date Field? I want to sum by a month Please write an example Thank you for your time
| | 3 | 69 | 11/20/2007 6:56:54 PM |
Concatenation Hi,I wish to concatenate two fields in oneSELECT (lname + ', ' + fname) AS Name from clientsThe above is not working ! How to ?Thanks
| | 6 | 48 | 11/19/2007 6:12:33 PM |
Birthdate Query Hello Everyone,
I have an Interbase database which stores Contacts, and one of the fields is the Birthdate, of type TIMESTAMP. I need to be able to query all Contacts with birthdat | | 7 | 65 | 11/16/2007 5:42:02 AM |
Using EXISTS in views crashed IB (6.0)?? Hi.
We have an existing installation of IB Server 6 which I was updating to incorporate some new views. When testing I ran across the following problem. I have a view, which results | | 12 | 56 | 11/14/2007 9:51:25 PM |
Contact Age Query Hello Again,
I have a database of contacts, and each contact has a birthdate (CBIRTHDAY). I'm using the following query to determine which contacts are at least X years old.
| | 5 | 51 | 11/6/2007 1:36:55 PM |
DECLARE CURSOR... Hi,
According to the Language Reference, DECLARE CURSOR should be available in DSQL. Am I missing something here, but I cannot get it to work.
-- Martijn Tonies Data | | 11 | 91 | 11/6/2007 1:15:53 PM |
Speed Difference Hello Again,
I'm curious as to the speed of the UNION statement. I have a CONTACTS table, which contains phone number prefix fields: HPHONEPREFIX, MPHONEPREFIX, (and others, but we | | 6 | 49 | 11/5/2007 5:04:01 PM |
Max Length SQL Statement I have a screen which could potentially generate some really really long SQL commands. When sending an SQL statement to the Interbase server, is there a limitation on how long the query str | | 4 | 49 | 11/5/2007 12:39:18 PM |
Error creating Stored Procedure in Interbase 2007 I get the following Error, The Stored Procedure is not preexistant :
ISC ERROR CODE:335544351
ISC ERROR MESSAGE: unsuccessful metadata update STORE RDB$PROCEDURE_PARAMETERS f | | 14 | 73 | 11/4/2007 11:59:42 PM |
Update IB6,5
Table1 PDATE=DATE PDAY=SMALLINT ..... PDATE is Payment Date PDAY is Customer's payment day ( 30 or 60...)
PayDate:=StrToDate(Edit1.Text)+Table1PDAY.Value
| | 0 | 53 | 11/2/2007 9:01:30 PM |
Creating Strored Procedure at Runtime Hi,
I can create many IB tables, triggers, generators, indexes, procedures etc with run time sql calls but when I try to build the following stored procedure I get an error :-
| | 3 | 55 | 10/27/2007 10:44:07 AM |
retrieve rows where one field is duplicated What would be the quickest way to retrieve all the rows from a table where one field has duplicates in another row? So for example if we want the rows where f1 has duplicates and the foll | | 2 | 50 | 10/24/2007 1:11:59 PM |
deployment hello all
I developed an aspx application with delphi 2005 I have used interbase6 database is working fine with winXP It doesnt work with windows 2003 server IIS
I use | | 3 | 60 | 10/19/2007 1:47:03 PM |
Insert using TIBDataset and InsertSQL Hi, Folks I have used interbase with delphi for a while and I am stuck trying to insert a record in a table. MyTable contains a field MID which is a unique identifier generated by an app | | 3 | 137 | 10/18/2007 11:40:24 PM |
Trigger Hello,
TSR, I still remember the Terminiate Stay Resident Sidekick from Borland.
I wish to write one that would query a database at regular interval or trigger when a record is i | | 7 | 52 | 10/15/2007 6:48:35 AM |
Recursive Stored Procedure
I have two tables T_PRODUCT_GENERAL and T_PRODUCTS_COMPOSITION. The idea is that a products can consist of subproducts which in return can consist of subproducts ...
for example if i | | 1 | 60 | 10/14/2007 3:04:25 PM |
AfterInsert and BeforeInsert property Hello all
These properties are not triggered when inserting in the table
either in the Stored procedure component property nor in a table property related to the table
| | 9 | 48 | 10/11/2007 4:35:28 PM |
Join takes too much time
I have a Table T_EMPLOYEE_GENERAL which i want to combine with a stored procedure SP_EMPLOYEE_WORKPOINTSHISTORY. The stored calculates the sum of points the employee has worked during
| | 2 | 68 | 10/11/2007 3:06:38 PM |
Update IB 6,02
Table Field ( Varchar (10), Value = '1200' I need to delete the just 2 quotes, Value should be 1200
Thank You.
| | 1 | 45 | 10/5/2007 2:22:14 PM |