Monday, March 3, 2008

ORA-01445: cannot select ROWID from a join view wihtout a key-preserved table.

Today, I was building an huge query, after adding another branche, the query returned me this strange error :

ORA-01445: cannot select ROWID from a join view wihtout a key-preserved table.
My query was something like this :
select * from tableA a join tableB b on (a.column = b.column)
No row_ids...

After struggling with it for a while, I search metalink, and after all it was Oracle thats causing my problems.... Oracle(9) has a limit of 1050 columns in any query that uses ANSI joins. So I've changed my query to :
select * from tableA a join (select column from tableB) b on (a.column = b.column)
This way I've reduced my query colums and my problem was solved.

Friday, February 15, 2008

Applet : Fast button enable

Today, I came across this great tip from Siebel Unleashed, in how to enable an applet button;

If you create a button and give method name as CopyScript then change it to EventMethodCopyScript it will automatically enable the button. But you need to change the method name at BC level too. So at BC Level the scripting will change to

if(MethodName == “EventMethodCopyScript”)

Enjoy!

Wednesday, February 13, 2008

SQLNavigator : Toolbars have disappeared

Today, I had to query my Database, start SQL Navigator instance and .... Surprise!!
All my toolbars have disappeared. Happily, I've only to delete one registry folder to solve my problem.
If this happen, all you have to do is :

  1. Close all your sql navigator running instances;
  2. Open registry; (Click run and type regedit)
  3. Go to : HKEY_CURRENT_USER\Software\Quest Software\SQL Navigator
  4. Delete Main_Form folder

And you are ready to go.

Thursday, February 7, 2008

Oracle Sample Code Incubator

New Oracle wiki, you can try it here. Let's share our common, or not so common, daily routines.

Wednesday, January 23, 2008

BC : Force Active Property

This business component property is more powerfull than most people imagine. Why?
It's simple. If used unnecessary it can decrease application performance.
When you set this property to TRUE, it means that this fiels is queried every time business component is instantiated :

  1. Every time you do a BO.GetBusComp(”Name”) in a script.
  2. Every time you navigate in application and the underlying BC is "Name".
  3. BC is accessed internally in any form.

Why?

Every time you make a field Force active it will be made part of where clause each time a query is issued against that BC or table irrespective of the fact that field is required or not.

You can read detailed information here

Thursday, January 17, 2008

EIM : Session SQL

When using EIM to delete,update or insert data, you can perform some post execution operations. Just use SESSION SQL keyword in your IFB, this allow you to execute a query after EIM section ends is execution.
You can read more about it here.

Monday, January 14, 2008

EIM : How to populate S_EVT_ACT contact columns.

This was my last task, populate primary contact columns (target_per_id and pr_con_id) in activities table (s_evt_act). So, I start looking for some eim table to do my job, and after looking my entire references I didn't find one.
And why didn't I found one? Because, there are no explicit way to do it. So what you have to do is :

  1. Populate s_act_contact intersection table with the desired pair activity/contact using EIM_ACTIVITY1.
  2. Set ACT_TARGET_PER and ACT_PR_CON (in EIM table) to 'Y'.
  3. Run EIM task.

Internally EIM will implicitly fill s_org_ext columns for you. Below you can find an ifb excerpt that do what we desire.

[Update Activities]TYPE = IMPORT
BATCH = 4511
TABLE = EIM_ACTIVITY1
ONLY BASE TABLES = S_EVT_ACT,S_ACT_CONTACT