Not null and enable or disable column in tabular form
Hi,
Using apex version 4.1 and working on tabular form.
ACT_COA_SEGMENT_MAS is Master table
and
ACT_SEGMENT_VALUES_MAS is detail table
I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
Thanks & Regards
Vedant
Edited by: Vedant on Jan 9, 2013 9:12 PM
Vedant,
You need to create you own manual tabular form and not use the wizard.
Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
Hope that help.
Vivek
Similar Messages
-
Disable column in tabular form
Hi,
I am working on apex4.1 ,working on tabular form . i want to disable columns in tabular form.
I Have debit and credit column in tabular form.These columns are multiply by exchange rate.
if i have multiplication of Debit_prod =debit*Exchange_rate then
credit column should be disable, and if Multiplication of cr_prod =Credit*Exchange_rate
then dr column should be disable.
Thanks in advance.
Thanks & Regards
Vedant
Edited by: Vedant on Sep 20, 2012 4:14 AMHi,
Thanks for reply.
I am entering the value in tabular form. As i fill debit or credit column of the tabular form,Then if value in the debit column i have entered ,then on press tab control switch to exchange rate column , credit column should not be enterable and vice versa.
Thanks & Regards
Vedant -
From two given tables, how do you fetch the values from two columns using values from one column(get values from col.A if col.A is not null and get values from col.B if col.A is null)?
Hi,
Use NVL or COALESCE:
NVL (col_a, col_b)
Returns col_a if col_a is not NULL; otherwise, it returns col_b.
Col_a and col_b must have similar (if not identical) datatypes; for example, if col_a is a DATE, then col_b can be another DATE or it can be a TIMESTAMP, but it can't be a VARCHAR2.
For more about NVL and COALESCE, see the SQL Language manual: http://docs.oracle.com/cd/E11882_01/server.112/e26088/functions119.htm#sthref1310
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables involved, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ: https://forums.oracle.com/message/9362002 -
Default Value , Not Null and EJB2.1
Hi ,
Am using Weblogic10.3 + Oracle Db + EJB2.1 Local Entity Beans .
The issue is that one of the table has createdDt which is not null and is defualt is set to Sysdate. When I try to create this Entity with createdDt null , I get an exception like below , But since I have mentioned default value , I shouldnt be getting this. Have I missed something ?
Code is quite straighforward
Organisation org = organisationHome.create();
....org.setter methods..
java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01400: cannot insert NULL into ("XXX"."ORGANISATION_T"."CREATEDDT_F")
ErrorCode=1400 SQLState=23000
java.sql.SQLException: [BEA][Oracle JDBC Driver][Oracle]ORA-01400: cannot insert NULL into ("XXX"."ORGANISATION_T"."CREATEDDT_F")
at weblogic.jdbc.base.BaseExceptions.createException(Unknown Source)
at weblogic.jdbc.base.BaseExceptions.getException(Unknown Source)
at weblogic.jdbc.oracle.OracleImplStatement.execute(Unknown Source)
at weblogic.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at weblogic.jdbc.base.BaseStatement.executeUpdateInternal(Unknown Source)
at weblogic.jdbc.base.BasePreparedStatement.executeUpdate(Unknown Source)
at weblogic.jdbcspy.SpyPreparedStatement.executeUpdate(Unknown Source)
at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:159)
at weblogic.ejb.container.manager.BaseEntityManager.executeInsertStmt(BaseEntityManager.java:763)
at weblogic.ejb.container.internal.TxManager$TxListener.executeInsert(TxManager.java:900)
at weblogic.ejb.container.internal.TxManager$TxListener.executeDBOperations(TxManager.java:831)
at weblogic.ejb.container.internal.TxManager$TxListener.beforeCompletion(TxManager.java:1054)
at weblogic.transaction.internal.ServerSCInfo.doBeforeCompletion(ServerSCInfo.java:1217)
at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1195)
at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:118)
at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1302)
at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:2114)
at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:263)
at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:230)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:621)
at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:60)
at weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:441)
at com.tieto.tix.core.domain.DomainServices_7p8lqs_EOImpl.createOrganisation(DomainServices_7p8lqs_EOImpl.java:7717)
at com.tieto.tix.core.domain.DomainServices_7p8lqs_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)parmTest( , "param2") is syntactically incorrect, so there can be no "workaround".
In addition to solutions offered by SwapnilVJ and Saransoft84, you could also use a rest parameter:
function parmTest(... args)
// set up default values
var val1:Boolean=true;
var val2:String="";
switch(args.length)
case 0:break;
case 1:
if(args[0] is String){val2=args[0] as String;}
else{val1=args[0] as Boolean;}
break;
case 2:
default:
val1=args[0] as Boolean;
val2=args[1] as String;
break;
trace(val1 + " " +val2);
parmTest();
parmTest("hello");
parmTest(null,"hello");
parmTest("hello",null); -
Difference between Not Null and Null..
Hi All,
In Conditional Region portion i would like to know the difference between
Value of item in Expression 1 is not null and we will assign the text filed name in expression.
Value of item in Expression 1 is null
When we have use the above two scenerio's ..
Not null means what it has some value in text filed or not.
pls help me out.
Anoo..Hello Anoo,
Validations check the input and will return an error message if the validation is not met (like 'Field is required').
Conditions can be used to run a Process (or render an item) when some condition is met - or not- (like do this only when field is not null).
Greetings,
Roel
http://roelhartman.blogspot.com/
http://www.bloggingaboutoracle.org/
http://www.logica.com/ -
how do i restart my ipod touch if the power off button does not work and it is disabled and it say connect to Itunekyl
Place the iPod in recovery mode using this program. and then restore via iTunes.
RecBoot: Easy Way to Put iPhone into Recovery Mode -
Disable Item in tabular form in Apex
I would like to disable items in tabular forms.
If line status is Draft then all items of tabular form are enable other disable.
How to write this condition and where should i write because in dynamic action tabular Item is not showing...
Edited by: 926257 on Apr 9, 2012 12:53 AMhi
926257
you can do that using java script
these links may helpful to you
<a href>Tabular form: how to dynamically enable/disable columns and rows
<a href>Tabular Form: Enable/Disable a field based on the status of a check box
<a href>http://www.codetoad.com/javascript/enable_disable_form_element.asp</a>
<a href>http://www.tizag.com/javascriptT/javascript-getelementbyid.php</a>
thanks and regards
pavan -
How to have cascading lov for a single column in tabular form
Hi,
How to have a cascading lov for a single column in tabular form
ie i have one employee name column
in tabular form if v pressed add row then one row ll be added
In my scenario based on first row value
the second row value to be displayed
To achieve this what i have to do ..
Regards,
PavanREAD Cascading select list on tabular form and
Oracle APEX 4.0: Cascading LOVs/Select Lists | Inside Oracle APEX by Patrick Wolf BLOG
helps you,
Pars. -
Get list of Not Null and PK Columns
hi All,
I need to get the list of all the columns which are part of PK and not null, can you help me on this?
with the below query I am getting the not null ones but need to get the PK columns also
SqlServer Version is 2008R2
SELECT TABLE_CATALOG AS Database_Name, TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, IS_NULLABLE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'Express'
AND IS_NULLABLE = 'NO'
Thanks!
NeilGive this a go. It includes by bitval solver function, as the status column is stored that way.
CREATE FUNCTION dbo.solveBitVal(@val BIGINT)
RETURNS @result TABLE (id INT, bitvalue BIGINT)
BEGIN
DECLARE @bitTranslate TABLE (id INT, bitvalue BIGINT)
DECLARE @numbah TABLE (num INT)
DECLARE @loopah INT
SET @loopah = 1
WHILE @loopah <= 63
BEGIN
INSERT INTO @bitTranslate (id, bitvalue) VALUES (@loopah, POWER(CAST(2 AS BIGINT),@loopah-1))
INSERT INTO @numbah (num) VALUES (@loopah)
SET @loopah = @loopah + 1
END
WHILE @val > 0
BEGIN
INSERT INTO @result
SELECT MAX(id), MAX(bitvalue) FROM @bitTranslate WHERE bitvalue <= @val
SELECT @val = @val - MAX(bitvalue) FROM @bitTranslate WHERE bitvalue <= @val
END
RETURN
END
GO
;WITH cons AS (
SELECT o.name, c.*, b.id AS statusID, ROW_NUMBER() OVER (PARTITION BY c.id, colid ORDER BY b.id) AS seq
FROM sys.sysconstraints c
INNER JOIN sys.objects o
ON c.id = o.object_id
CROSS APPLY dbo.solveBitVal(c.status) b
), rCTE AS (
SELECT c.name, c.constid, c.id, c.colid, c.spare1, c.status, c.actions, c.error, CAST(CASE WHEN statusID = 1 THEN 'PRIMARY KEY constraint '
WHEN statusID = 2 THEN 'UNIQUE KEY constraint '
WHEN statusID = 3 THEN 'FOREIGN KEY constraint '
WHEN statusID = 4 THEN 'CHECK constraint '
WHEN statusID = 5 THEN 'DEFAULT constraint '
WHEN statusID = 16 THEN 'Column-level constraint'
WHEN statusID = 32 THEN 'Table-level constraint '
END AS NVARCHAR(MAX)) AS statusName, c.seq, c.statusID
FROM cons c
WHERE seq = 1
UNION ALL
SELECT c.name, c.constid, c.id, c.colid, c.spare1, c.status, c.actions, c.error, CAST(r.statusName + ', ' + CASE WHEN c.statusID = 1 THEN 'PRIMARY KEY constraint '
WHEN c.statusID = 2 THEN 'UNIQUE KEY constraint '
WHEN c.statusID = 3 THEN 'FOREIGN KEY constraint '
WHEN c.statusID = 4 THEN 'CHECK constraint '
WHEN c.statusID = 5 THEN 'DEFAULT constraint '
WHEN c.statusID = 16 THEN 'Column-level constraint'
WHEN c.statusID = 32 THEN 'Table-level constraint '
END AS NVARCHAR(MAX)), c.seq, c.statusID
FROM cons c
INNER JOIN rCTE r
ON c.id = r.id
AND c.colid = r.colid
AND c.seq - 1 = r.seq
SELECT *
FROM rCTE
Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question. -
How To know Which Columns are not null and Which are null
Hi Freinds,
I want to Know ,How by Wrting a Query we can get the Names of The Columns from the Table which is set to not-null or null,
Thanks
ShoaibSELECT * FROM user_tab_columns
WHERE table_name='Your_Table_Name'Check NULLABLE column. -
DB Diagram: Modality Difference between NOT NULL and check constraint
Hi,
I am using jdev 11g (11.1.1.10) I am trying to create a db diagram from two tables. I have a FK that is NOT NULL (defined on the column). When i try to display these two tables modality, it does not show up in the diagram. I noticed that there are two ways NOT null can be defined on a table (right click on the db object to edit it; a) under column definitions there is a check box for not null, b) there is a check constraint that one can add to do not null.
I am confused and was wondering whether I must I have check constraints on the database in order to display modality (optional versus mandatory). Logically speaking it does not make any sense though.Hi Susan,
Thanks for your email. I understand that in order to show modality under
UML notation, one must define a COLUMN being NOT NULL instead of defining a check constraint.
I still do not understand how modality (optional versus mandatory) is shown in ERD notation in JDev. I tried flipping ERD/UML notations and made sure icons for tables were showing, but no MODALITY is shown in ERD notation ( an '0" icon or a "|" icon for optional and mandatory). Is it the solid line versus dotted line in the ERD diagram? I am confused because generally under Crawfoot ERD notation '0" icon or a "|" icon is shown for modality.
Modality gets picked up in jdev diagram when COLUMN not null is specified and UML notation is used
ALTER TABLE DETAILAJ MODIFY EMPID not null;
Modality does not get picked up in jdev db diagram when check constraint is specified and UML notation is used
ALTER TABLE DETAILAJ
ADD CONSTRAINT CK_NN_DETAILAJ__EMPID CHECK(EMPID IS NOT NULL) ;
Another question i have related to the matter mentioned above is as follows. Since I want to see modality in db diagram, it follows that I must define a column as not null instead of a check constraint. I must also use NO VALIDATE on NOT NULL column because i have prior data that does not meet the new restriction. I noticed that if i use the following syntax to define a NOT NULL column, two things happen.
a) A constraint is defined as not null automatically and a system generated name is given to the constraint.
b) DB diagram in Jdev does not show the modality.
My question is whether there is a way to see modality in this case.
alter table DETAILAJ
MODIFY EMPID NOT NULL ENABLE NOVALIDATE ;
Edited by: user11219846 on Nov 19, 2009 11:07 AM -
Hi, I am trying to properly display a list of tasks for a project however without a join to the project number (which I was aware of) and the employee table, I get over 500 results.
The task can be created without a employee assigned to it so therefore the page does not require the field to be filled in.
Here is the SQL code, any does anyone have any ideas?
select
pd.pk_proj_detail_id "Task Number",
pd.task_title "Task Title",
pd.DETAIL_STATUS "Task Status",
pm.name "Associated Project",
pps.last_name||', '||pps.first_name||', '||pps.middle_initial||'.' "Assigned Employee",
pd.TRACKIT_NUMBER "TrackIt! Number",
pd.CREATEBY_DATE "Date Entered",
pd.DATE_BEGIN "Date Began",
pd.ESTIMATED_DATE "Estimated Completion Date",
pd.DATE_END "Date Completed"
from
PROTRAC_DETAIL pd,
protrac_master pm,
cobr.vw_pps_payroll pps,
resources r
where
pd.fk_proj_master_id = pm.PK_PROJ_MASTER_ID
and r.fk_master_id = pm.PK_PROJ_MASTER_ID
and (r.emp_id = pps.emple_no
or r.emp_id is null)It's 10g r2 with Application Express 3.1.0.00.32
This is the tasks (detail) table
ALTER TABLE PROTRAC_DETAIL
DROP PRIMARY KEY CASCADE;
DROP TABLE PROTRAC_DETAIL CASCADE CONSTRAINTS;
CREATE TABLE PROTRAC_DETAIL
PK_PROJ_DETAIL_ID NUMBER NOT NULL,
FK_PROJ_MASTER_ID NUMBER,
TRACKIT_NUMBER NUMBER,
DETAIL_DESCRIPTION VARCHAR2(4000 CHAR),
DETAIL_STATUS VARCHAR2(19 CHAR),
DETAIL_STATUS_COMMENT VARCHAR2(4000 CHAR),
DATE_BEGIN DATE,
DATE_END DATE,
ESTIMATED_DATE DATE,
CREATEBY_DATE DATE,
CREATEBY_USER VARCHAR2(50 CHAR),
LASTMOD_DATE DATE,
LASTMOD_USER VARCHAR2(50 CHAR),
TASK_TITLE VARCHAR2(100 CHAR)
TABLESPACE DEVPROTRAC_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
CREATE UNIQUE INDEX PROTRAC_DETAIL_PK ON PROTRAC_DETAIL
(PK_PROJ_DETAIL_ID)
TABLESPACE DEVPROTRAC_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
CREATE OR REPLACE TRIGGER BUI_PROTRAC_DETAIL
before insert or update
on PROTRAC_DETAIL
referencing new as New old as Old
for each row
begin
if inserting then
select users_seq.nextval, sysdate, apex_application.g_user
into :new.pk_proj_detail_id, :new.createby_date, :new.createby_user
from dual;
elsif updating then
select sysdate, apex_application.g_user
into :new.lastmod_date, :new.lastmod_user
from dual;
end if;
end;
SHOW ERRORS;
ALTER TABLE PROTRAC_DETAIL ADD (
CONSTRAINT PROTRAC_DETAIL_PK
PRIMARY KEY
(PK_PROJ_DETAIL_ID)
USING INDEX
TABLESPACE DEVPROTRAC_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
ALTER TABLE PROTRAC_DETAIL ADD (
CONSTRAINT PROTRAC_DETAIL_NUM
FOREIGN KEY (FK_PROJ_MASTER_ID)
REFERENCES PROTRAC_MASTER (PK_PROJ_MASTER_ID));
ALTER TABLE DEVPROTRAC.RESOURCES ADD (
FOREIGN KEY (FK_DETAIL_ID)
REFERENCES DEVPROTRAC.PROTRAC_DETAIL (PK_PROJ_DETAIL_ID));
SET DEFINE OFF;
Insert into PROTRAC_DETAIL
(PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
Values
(34, 24, NULL, 'test', 'Queued',
NULL, NULL, NULL, NULL, TO_DATE('10/30/2008 13:37:01', 'MM/DD/YYYY HH24:MI:SS'),
'LREDMOND', TO_DATE('11/03/2008 15:19:35', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'bananana');
Insert into PROTRAC_DETAIL
(PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
Values
(41, 40, NULL, '2354234', 'Queued',
NULL, NULL, NULL, NULL, TO_DATE('10/31/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
'LREDMOND', TO_DATE('11/03/2008 13:52:02', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', 'I can type on the keyboarddf');
Insert into PROTRAC_DETAIL
(PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
Values
(49, 32, 78888, 'one day fishsticks will walk on the moon.', 'Queued',
'waiting for fishsticks.', NULL, NULL, NULL, TO_DATE('11/03/2008 11:28:11', 'MM/DD/YYYY HH24:MI:SS'),
'LREDMOND', NULL, NULL, 'Fix the keyboard');
Insert into PROTRAC_DETAIL
(PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
Values
(50, 38, NULL, 'dfdfdfdfdfdfdfdfdf', 'Queued',
NULL, NULL, NULL, NULL, TO_DATE('11/03/2008 12:03:06', 'MM/DD/YYYY HH24:MI:SS'),
'LREDMOND', TO_DATE('11/03/2008 15:19:44', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'resreeeeeeeeee');
Insert into PROTRAC_DETAIL
(PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
Values
(33, 31, NULL, 'Make sure the bananas are fresh', 'Queued',
NULL, NULL, NULL, NULL, TO_DATE('10/29/2008 00:00:00', 'MM/DD/YYYY HH24:MI:SS'),
'LREDMOND', TO_DATE('11/03/2008 15:19:52', 'MM/DD/YYYY HH24:MI:SS'), NULL, 'e543563465');
Insert into PROTRAC_DETAIL
(PK_PROJ_DETAIL_ID, FK_PROJ_MASTER_ID, TRACKIT_NUMBER, DETAIL_DESCRIPTION, DETAIL_STATUS,
DETAIL_STATUS_COMMENT, DATE_BEGIN, DATE_END, ESTIMATED_DATE, CREATEBY_DATE,
CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, TASK_TITLE)
Values
(48, 37, NULL, 'guitar heros! yay', 'Queued',
NULL, NULL, NULL, NULL, TO_DATE('11/03/2008 11:26:06', 'MM/DD/YYYY HH24:MI:SS'),
'LREDMOND', TO_DATE('11/03/2008 15:19:57', 'MM/DD/YYYY HH24:MI:SS'), NULL, '34444444444444543etfg');
COMMIT;This is for the resources table:
ALTER TABLE RESOURCES
DROP PRIMARY KEY CASCADE;
DROP TABLE RESOURCES CASCADE CONSTRAINTS;
CREATE TABLE RESOURCES
PK_RESOURCES_ID NUMBER,
FK_DETAIL_ID NUMBER,
EMP_ID NUMBER,
RESOURCE_STATUS VARCHAR2(8 CHAR),
RESOURCE_COMMENT VARCHAR2(4000 CHAR),
CREATEBY_DATE DATE,
CREATEBY_USER VARCHAR2(50 CHAR),
LASTMOD_DATE DATE,
LASTMOD_USER VARCHAR2(50 CHAR),
FK_MASTER_ID NUMBER
TABLESPACE DEVPROTRAC_DATA
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
CREATE UNIQUE INDEX RESOURCES_PK ON RESOURCES
(PK_RESOURCES_ID)
TABLESPACE DEVPROTRAC_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
BUFFER_POOL DEFAULT
CREATE OR REPLACE TRIGGER BUI_RESOURCES
before insert or update
on RESOURCES
referencing new as New old as Old
for each row
begin
if inserting then
select users_seq.nextval, sysdate, apex_application.g_user
into :new.pk_resources_id, :new.createby_date, :new.createby_user
from dual;
elsif updating then
select sysdate, apex_application.g_user
into :new.lastmod_date, :new.lastmod_user
from dual;
end if;
end;
SHOW ERRORS;
ALTER TABLE RESOURCES ADD (
CONSTRAINT RESOURCES_PK
PRIMARY KEY
(PK_RESOURCES_ID)
USING INDEX
TABLESPACE DEVPROTRAC_DATA
PCTFREE 10
INITRANS 2
MAXTRANS 255
STORAGE (
INITIAL 64K
MINEXTENTS 1
MAXEXTENTS 2147483645
PCTINCREASE 0
ALTER TABLE RESOURCES ADD (
FOREIGN KEY (FK_DETAIL_ID)
REFERENCES PROTRAC_DETAIL (PK_PROJ_DETAIL_ID),
FOREIGN KEY (FK_MASTER_ID)
REFERENCES PROTRAC_MASTER (PK_PROJ_MASTER_ID));
SET DEFINE OFF;
Insert into RESOURCES
(PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
Values
(53, 50, 356654, 'Active', NULL,
TO_DATE('11/04/2008 09:32:06', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', NULL, NULL, NULL);
Insert into RESOURCES
(PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
Values
(51, 41, 447250, 'Active', 'No Sure.',
TO_DATE('11/03/2008 14:23:11', 'MM/DD/YYYY HH24:MI:SS'), NULL, TO_DATE('11/04/2008 09:00:04', 'MM/DD/YYYY HH24:MI:SS'), NULL, 40);
Insert into RESOURCES
(PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
Values
(54, 50, 323829, 'Active', NULL,
TO_DATE('11/04/2008 10:26:08', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', NULL, NULL, 38);
Insert into RESOURCES
(PK_RESOURCES_ID, FK_DETAIL_ID, EMP_ID, RESOURCE_STATUS, RESOURCE_COMMENT,
CREATEBY_DATE, CREATEBY_USER, LASTMOD_DATE, LASTMOD_USER, FK_MASTER_ID)
Values
(52, 33, 8915, 'Active', 'get to work',
TO_DATE('11/03/2008 15:20:18', 'MM/DD/YYYY HH24:MI:SS'), 'LREDMOND', TO_DATE('11/03/2008 15:35:10', 'MM/DD/YYYY HH24:MI:SS'), NULL, NULL);
COMMIT;The results I want is everything above regardless of emp_id assigned (if any). Without the r.emp_id = pps.emple_no join, the query will generate 234234239482304234 results.
Hope this helps.
Edited by: leland on Nov 4, 2008 12:56 PM -
I have a performance issue with a query - it would be something like -
select col1,col2, sum(col3), get_val(col_4)
from table1
where
get_val(col_4) is not null
group by col1,col2, get_val(col_4)
I have simplified this but it is something similar. This works great - performance is great. Now I commented out the where clause as I needed to populate null values - and that's it the query does not retrieve the resultset - it keeps running forever. With the where clause it comes back in 60 seconds. There is only one row out of 560 rows that has null value for col_4 which i need to display.
Any help is appreciated.The only difference I notice between the two sqls is HASH(UNIQUE) -
with IS NOT NULL in where clause -
SELECT STATEMENT ALL_ROWS 1598 1 209
HASH(UNIQUE) 1598 1 209
HASH(GROUP BY) 1598 1 209
When is not null is removed from the where clause -
SELECT STATEMENT ALL_ROWS 1598 1 206
HASH(GROUP BY) 1598 1 206
I'm guessing that the index is being used in the first scenario and not in the second. Any idea/suggestion as to how to over come this?
Thanks -
Problem - grayed out apple id in app store
I have signed in to my account, I am the admin and my apple id is correct shown in itunes, and other apps except the appstore.
In Appstore, it shows another email id and it is disabled.
Problem
1. I do not know why another email id is visible in my account (we have separate accounts on this laptop , all admins)
2. Why wouldn't it allow me to change the login name and let me get on with my updates!!
Options already looked
1. phone - asked me to go to support blah blah .apple.com
2. internet - i'm here.
3. Applet id - manage on line- all is well there. no need to change anything.
4. other apps with apple id involved - checked and works fine.Do you recognize the ID?
-
I downloaded the IOS7 on my iphone yesterday. Asked for a password, put it in. Now the password does not work and my phone is now disabled. What can I do?
Hi there Martha250,
I would recommend taking a look at the troubleshooting steps found in the article below.
iOS: Unable to update or restore
http://support.apple.com/kb/HT1808
-Griff W.
Maybe you are looking for
-
IBook is not working right on IPad and iPhone!!!
Why don't the Ipad Mini don't highlight words all the time. When I click on a word I want to highlight or a word that I want to define or a word that I want to post on Facebook the IPhone5 or Ipad Mini want do those kind of thing it only do it whe
-
Welcome to the Network Management Discussion
Welcome to the Cisco Networking Professionals Connection Wireless Forum. This conversation will provide you the opportunity to discuss issues surrounding Network Management. We encourage everyone to share their knowledge and start conversations on is
-
im tryin to install the new software for itunes but something pops up saying they cant find a certain file for itunes what should i do
-
Hi i got a user that complain that her CS6 design and web prem is not acting very good the color picker in illustrator is slow and the general acting of the softwares is so slow. she's runing windows 7 64 bit with 64 bits software installed any recom
-
Hi In PA40 getting an error Feature ACTCE has not been activated yet...This is any customizied problem or Authorization problem... Any one can help on this. Regards Madhavi