[firebird-support] Re: FB does table scan as soon as I use left outer join in view - why?

2015-08-21 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
21.08.2015 12:14, 'Louis van Alphen' wrote: Dmitry thanks for the insight. This actual puts FB in quite a different light. I have used FB since IB 5 and is my DB of choice. However this issue may prove quite problematic. It does not cover all cases with views, only the ones when you need to

[firebird-support] Re: FB does table scan as soon as I use left outer join in view - why?

2015-08-21 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
21.08.2015 13:58, 'Louis van Alphen' wrote: Dmitry, re your point 4, do you mean: create view SKIN as select ID, (select NAME from COLOUR_ C where C.ID = S.COLOUR_ID) from SKIN_ S; Right. Not very good option when you need many lookup fields from the same table, but could still be

RE: [firebird-support] Regarding ODBC

2015-08-21 Thread 'Raman, Anitha' anitha.ra...@am.jll.com [firebird-support]
32-bit Classic, Superclassic Superserver March 30, 2015 Firebird-2.5.4.26856_0_Win32.exehttp://sourceforge.net/projects/firebird/files/firebird-win32/2.5.4-Release/Firebird-2.5.4.26856_0_Win32.exe/download 7 MB Windows executable installer for full Superclassic/Classic or Superserver,

[firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Nobody knows? Nobody has any idea? Greetings. Walter. On Thu, Aug 20, 2015 at 10:45 AM, Walter R. Ojeda Valiente sistemas2000profesio...@gmail.com wrote: Hello everybody For add a Primary Key to a table we can write: ALTER TABLE MyTable ADD PRIMARY KEY (ID); or we can write: ALTER

Re: [firebird-support] Join to same table twice - or joins vs subqueries

2015-08-21 Thread setysvar setys...@gmail.com [firebird-support]
select r.id, (select a.node from nodes a where r.node_id = a.id) node, route_index, (select b.node from nodes b where r.link_id = b.id) link_node, (select c.quality_label from route_qualities c where r.quality = c.QUALITY) from routes r where exists(select *

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Ann Well, the world has not falled out, nothing so dangerous, the error message is: Cannot commit transaction: The insert failed because a column definition includes validation constraints. validation error for column ID, value *** null ***. The question is: Why without using CONSTRAINT

RE: [firebird-support] RETURNING_VALUES optional variables?

2015-08-21 Thread 'stwizard' stwiz...@att.net [firebird-support]
Jorge, I have done a SELECT FROM instead of an EXECUTE PROCEDURE when I do not need all the fields returned in a stored procedure. This will only work I think if the SP has a SUSPEND; in it. SELECT R_PRINC_BAL, R_FEE_BAL FROM SPS_CASE_CUR_BAL(:ACCT_ID, :CASE_ID, NULL, 1)

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread Ricardo Uzcategui ricardou...@cantv.net [firebird-support]
hi. Maybe you post an ilegal name or this name are not unique for entery database objects name's. every object in firebird database must be unique. no matters if the same name is used on diferent tables. On Fri, Aug 21, 2015 at 12:24 PM, 'Walter R. Ojeda Valiente'

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support]
Hello Ricardo Thank you for your answer, but that is not the problem. Without using CONSTRAINT doesn't work and in such case the name is choosed by Firebird, not for me. Greetings. Walter. On Fri, Aug 21, 2015 at 1:43 PM, Ricardo Uzcategui ricardou...@cantv.net [firebird-support]

[firebird-support] RETURNING_VALUES optional variables?

2015-08-21 Thread Jorge Andrés Brugger lis...@dasu.com.ar [firebird-support]
I´m calling a stored procedure (SP1) from inside another SP (SP2). SP2 has three output vars, but when calling it from SP1 I only need one value. It's possible to omit 2nd and 3rd parameters when using EXECUTE PROCEDURE? (Right now I´m using SP1 local variables whose values are never used).

Re: [firebird-support] Re: Differences when adding a Primary Key

2015-08-21 Thread Ann Harrison aharri...@ibphoenix.com [firebird-support]
On Aug 21, 2015, at 2:13 PM, 'Walter R. Ojeda Valiente' sistemas2000profesio...@gmail.com [firebird-support] firebird-support@yahoogroups.com wrote: Without using CONSTRAINT doesn't work and in such case the name is choosed by Firebird, not for me. For add a Primary Key to a table

[firebird-support] Re: FB does table scan as soon as I use left outer join in view - why?

2015-08-21 Thread setysvar setys...@gmail.com [firebird-support]
Something like: select S.* from COLLECTION_ COLL left join SKIN S on S.ID = COLL.SKIN_ID where S.ID is not null i.e. fake the left join to get the correct join order (COLLECTION_-SKIN_-COLOUR_). I guess that means that select S.* from COLLECTION_ COLL join SKIN S on S.ID = COLL.SKIN_ID+0

RE: [firebird-support] Re: FB does table scan as soon as I use left outer join in view - why?

2015-08-21 Thread 'Louis van Alphen' lo...@nucleo.co.za [firebird-support]
Dmitry thanks for the insight. This actual puts FB in quite a different light. I have used FB since IB 5 and is my DB of choice. However this issue may prove quite problematic. Let me explain: I have a large ERP class system ( currently ~400+ tables). An architectural design choice in the

[firebird-support] Re: FB does table scan as soon as I use left outer join in view - why?

2015-08-21 Thread Dmitry Yemanov dim...@users.sourceforge.net [firebird-support]
21.08.2015 10:26, 'Louis van Alphen' wrote: Dmitry, if I then understand you correctly, if a view contains an outer join, then FB will table scan? Is this documented somewhere so that I can read up? It depends on a number of factors, but generally your conclusion is correct. The problem is