субота, 06. новембар 2010.

Hierarchicaly items

Most useful thing is easy look at relater records. as Excell simple functionality for navigations, so I m lookin to solve problem for planning process in supply office departments with limits in materials, prices, items, money...Its DEMO for hierarchicaly views based on only ONE table, should be demonstrated on http://htmldb.oracle.com/pls/otn/f?p=28254:1




Tree hierarchical structures




Table plannavigacija have PK as ID column and NAME,CODE and IDID as FK with point to ID



code for select is

select * from plannavigacija where id in
with q as (
select level lvl,
id
from plannavigacija e
connect by prior id = idid
start with id = nvl(1,(SELECT COUNT(*) FROM PLANNAVIGACIJA))
)
select *
from (
-- employees above start with employee
select e.*
from plannavigacija e
connect by prior idid=id
start with id = nvl(1,(SELECT COUNT(*) FROM PLANNAVIGACIJA))
union
-- employees who are are peers of the start with employee
select e.*
from plannavigacija e
where level = (select lvl from q where id = nvl(1,(SELECT COUNT(*) FROM PLANNAVIGACIJA)))
connect by prior id = idid
start with id = nvl(1,(SELECT COUNT(*) FROM PLANNAVIGACIJA))
union
-- employees directly below start with employee
select e.*
from plannavigacija e
where idID = nvl(1,(SELECT COUNT(*) FROM PLANNAVIGACIJA))
) sub
connect by prior id = idid
start with id = nvl(1,(SELECT COUNT(*) FROM PLANNAVIGACIJA))
Where 1 is one variable :P1_X as start tree or root

понедељак, 24. август 2009.

Apex 3.01 on Linux Ununtu 8.04 based on Application Express 10g

Apex 3.01 can be install in Application Express 10g with this step:
1> need download zip Apex 3.01 and unzip it into /usr/lib/oracle/xe/apex folder
2> change apexins.sql UPGRADE to 2, PREFIX to /usr/lib/oracle/xe/apex/
and set path at the end of apexins.sql and save changes


from sql command line need type @ /usr/lib/oracle/xe/apex/apexins REPUBLICA SYSTEM SYSTEM TEMP /i/


Whith created Folder TEMP on /usr/lib/oracle/xe/ need copy pictures from apex/images folder in subfolder TEMP/i (I was creating and another folder /usr/lib/oracle/xe/TEMP/images with whole pictures



This figure explain how to call procedure for ADMIN user



Whith created ADMIN user needs insert password, with this username and password could be posible setting WORKSPACE and USER NAME and PASSWORD


finaly this step enter password for ADMIN user as confirmation

среда, 22. април 2009.

Import *.dmp into Oracle 10g XE Application Express on Linux Ubuntu 8.04

Using OS Linux Ubuntu 8.04 with install Oracle 10g XE application express, database users can imports *.dmp files, setting environmetn on this way>
0) instal *.deb file Oracle app expres and create user (in this samples user is adempiere and password is adempiere)
1) on terminal type> sudo gedit /etc/environment
2) set this environment>
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm:/home/nadrog:/home/nadrog/jdk1.6.0_11/bin:/home/nadrog/Adempiere/lib"
JAVA_HOME="/home/nadrog/jdk1.6.0_11"
JAVA="/home/nadrog/jdk1.6.0_11/bin/java"
CLASSPATH="/usr/lib/jvm:/home/nadrog"
JAVA_OPTS="-server -Xms128m -Xmx128m -Dprogram.name=run"
JRE_SRCROOT="/usr/lib/jvm/java-6-sun-1.6.0.07/bin/javaws"
ADEMPIERE_HOME="/home/nadrog/Adempiere"
JBOSS_HOME="/home/nadrog/Adempiere/jboss/lib"
COMPIERE_HOME="/home/nadrog/Compiere2"

3) restart PC and again on terminal type> sudo gedit /etc/environment
and add this environment
ORACLE_HOME="/usr/lib/oracle/xe/app/oracle/product/10.2.0/server"
ORACLE_SID="XE"
Restart PC and then type from terminal

nadrog@nadrog:~$ su oracle
Password:
To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.

oracle@nadrog:/home/nadrog$ .
bash: .: filename argument required
.: usage: . filename [arguments]
oracle@nadrog:/home/nadrog$ cd Desktop
oracle@nadrog:/home/nadrog/Desktop$ cd..

oracle@nadrog:~/app/oracle$ /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/imp adempiere@adempiere

Figure 1> Import dmp files into Oracle Application Express
10g XE

петак, 17. април 2009.

Adempiere 3.52 Oracle Application Express10g

Adempiere 3.52 is smart Enterprise Resource planning system, and offer good support for management and all enterprise activity.
Main page looking like above>
Figure 1> Main page Adempiere smart ERP system
Oracle Application Express 10g is database and have relation tables

Figure 2> AD_MENU table with attributes
Figure 3> Main Window and product setup
Figure 4> Main window and Financial setup
Figure 5> Wirh Oracle 10g need setup users, login as SYSTEM and PASSWORD from installations, and setup ADEMPIERE/ADEMPIERE
Figure 6> Setup ADEMPIERE/ADEMPIERE on Oracle Apex,
Figure 7 > Imports of Adempiere.dmp file into user Adempiere
This is installation Adempiere smart ERP on Windows platform