Join quries
Hi i have a cfoutput query which displays 11 list boxes from
the query "SelectNames", i have the selected value working ok
what i need now is to have a list of "#Surname#, #FirstName#"
from the query "SelectALL"
think i need to join the two queries not sure how to do it
any ideas
not sure if you understood what i need,
i have 2 option values below, the second one should show a
list of all surnames, firstname, but it actually only shows one,
because i have a output query allready "SelectNames" i need to have
another ie nested but this cant be done, so how esle can i do this
<cfoutput query="SelectNames"><tr>
<td>
<select name="Player1">
<option value="#SelectNames.PlayerID#"
selected>#SelectNames.Surname#,
#SelectNames.FirstName#</option>
<cfoutput query="SelectALL">
<option
value="#SelectALL.PlayerID#">#SelectALL.Surname#,
#SelectALL.FirstName#</option>
</cfoutput>
</select>
</td>
</tr></cfoutput>
Similar Messages
-
Hi Experts,
To create a new query by joining two quries, it is possible in Bex,
Please explain step by step procedure,
thanks
AravindHi,
Using Workbooks u can do this
Execute the 1st query
Save it as Workbook
Open the work book
Execute the 2nd Query in another sheet using Insert Query
Move result area of this 2nd query to wherever u want using Move result area -
Duplicates in sql query out put when qury has join on multiple tables.
I have the below query whcih is returning 2 duplicate records.
Is there any way how to figure out from which table is causing the duplicate?
There are so many inline view and join conditions in this query .
in waht join conditions i need to look into mainly?
or how to find the whcih table is causing the duplicate when we have multimple joins?
this is really bothering me a lot .please help me with this.
SELECT 'BCCALGLB' model_cd,
fi_instrument_id,
fmr_cusip instrument_id,
price,
'27-FEB-2013' pricing_dt,
currency_cd
FROM (SELECT II.fmr_cusip,
IAI.fi_instrument_id,
IP.price,
IP.currency_cd
FROM (SELECT IdxHldg.vendor_instrument_id,
IdxHldg.index_cd,
IdxHldg.data_source_cd,
GM.member_rank,
RANK () OVER (PARTITION BY IdxHldg.vendor_instrument_id
ORDER BY GM.member_rank ASC) priority
FROM (SELECT IBH.vendor_instrument_id,
IBH.index_cd,
IBH.data_source_cd
FROM fi_idx_benchmark_holdings IBH
WHERE IBH.pricing_dt = '27-FEB-2013'
UNION
SELECT IFH.vendor_instrument_id,
IFH.index_cd,
IFH.data_source_cd
FROM fi_idx_forward_holdings IFH
WHERE IFH.pricing_dt = '27-FEB-2013'
) IdxHldg,
fi_group_member GM
WHERE GM.group_cd = 'BCGLOBALIDX'
AND GM.purpose_cd = 'GLOBALIDX'
AND IdxHldg.index_cd = GM.character_val
) BCIdxHldg,
fi_idx_instrument II,
fi_idx_price IP,
instrument_alternate_id IAI,
instrument I
WHERE BCIdxHldg.priority = 1
AND BCIdxHldg.data_source_cd = II.data_source_cd
AND BCIdxHldg.vendor_instrument_id = II.vendor_instrument_id
AND II.data_source_cd = IP.data_source_cd
AND II.vendor_instrument_id = IP.vendor_instrument_id
AND IP.currency_cd = I.currency_cd
AND IP.pricing_dt = '27-FEB-2013'
AND II.fmr_cusip = IAI.alternate_id
AND IAI.alternate_id_type_code = 'FMR_CUSIP'
AND IAI.fi_instrument_id = I.fi_instrument_id
AND NVL (I.instrument_domain_cd, 'XXX') NOT IN ('MBS', 'MGEN')
AND NVL (I.instrument_type_cd, 'XXX') != 'CMBS'
AND ((I.currency_cd NOT IN ('CAD', 'USD'))
OR
(EXISTS (SELECT 1
FROM adm_calendar_date ACD,
ctry_curr_link CCL
WHERE TO_DATE (ACD.calendar_yyyymmdd, 'YYYYMMDD') = '27-FEB-2013'
AND ACD.calendar_origin_cd = 'EXCHANGE'
AND ACD.calendar_type_cd = 'BUSINESS'
AND ACD.geography_cd = CCL.ctry_cd
AND CCL.link_typ = 'ISS'
AND CCL.curr_cd = I.currency_cd
AND ACD.business_day_ind = 'Y'))))Hi,
953115 wrote:
I have the below query whcih is returning 2 duplicate records.
Is there any way how to figure out from which table is causing the duplicate?
There are so many inline view and join conditions in this query .
in waht join conditions i need to look into mainly?
or how to find the whcih table is causing the duplicate when we have multimple joins?What has changed since the last time the query ran correctly? (It must have run correctly at some point. You didn't just write a query that big all at once without testing each individual part, did you?)
Find a small set of sample data that causes the problem. Create and work with tables that have only that small set of data.
Take baby steps. Start with the most deeply nested sub-query. and simplify it so that it uses only 1 table: comment out all references to other tables. Does it produce exactly what you're expecting, especially the number of rows?
If not, post just that one sub-query, your sample data, and the output you need (but are not getting) from that sub-query.
If it does work, then un-comment the other tables, 1 at a time. Test after each one. If the revised sub-query starts acting strangely, then you have a good clue about what's causing the problem, but if you can't figure it out, post that much of the query, your sample data (CREATE TABLE and INSERT statements) and the expected results from the code you posted.
If then entire sub-query works, then add the next super-query, and repeat the testing process.
What is the data type of ibh.pricing_dt?
If its a DATE, then don't compare it to a VARCHAR2, as you're doing in this line:
IBH.pricing_dt = '27-FEB-2013'Use TO_DATE to convert a string, such as '27-FEB-2013', to a DATE.
If it's not a DATE (or TIMESTAMP), then you have an even more serious problem. -
Joining 4 select quries result
Hi there
i jeed need a little help here
i have 4 select statments which produces different result set i want to mere there result in single statement how can i do that
select (first select) as this,(2nd select) as this
like SQL server doesnt seems to work here are my quries
SELECT INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR, COUNT(INDS_T000D_GEN_INFO.IND_SER_NO) AS NUMBER_EST
FROM INDS_T000D_GEN_INFO, INDS_ECONOMY_ACTIVITY_L4, INDS_T151D_WASTE_QTY
WHERE INDS_T000D_GEN_INFO.MAIN_ECO_ACT = INDS_ECONOMY_ACTIVITY_L4.CODE AND
INDS_T000D_GEN_INFO.YEAR = INDS_T151D_WASTE_QTY.YEAR AND
INDS_T000D_GEN_INFO.IND_SER_NO = INDS_T151D_WASTE_QTY.IND_SER_NO AND (INDS_T151D_WASTE_QTY.SOLID_QTY > 0)
GROUP BY INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR
SELECT INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR, COUNT(INDS_T000D_GEN_INFO.IND_SER_NO) AS NUMBER_EST
FROM INDS_T000D_GEN_INFO, INDS_ECONOMY_ACTIVITY_L4, INDS_T151D_WASTE_QTY
WHERE INDS_T000D_GEN_INFO.MAIN_ECO_ACT = INDS_ECONOMY_ACTIVITY_L4.CODE AND
INDS_T000D_GEN_INFO.YEAR = INDS_T151D_WASTE_QTY.YEAR AND
INDS_T000D_GEN_INFO.IND_SER_NO = INDS_T151D_WASTE_QTY.IND_SER_NO AND (INDS_T151D_WASTE_QTY.LIQUID_QTY > 0)
GROUP BY INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR
SELECT INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR, COUNT(INDS_T000D_GEN_INFO.IND_SER_NO) AS NUMBER_EST
FROM INDS_T000D_GEN_INFO, INDS_ECONOMY_ACTIVITY_L4, INDS_T151D_WASTE_QTY
WHERE INDS_T000D_GEN_INFO.MAIN_ECO_ACT = INDS_ECONOMY_ACTIVITY_L4.CODE AND
INDS_T000D_GEN_INFO.YEAR = INDS_T151D_WASTE_QTY.YEAR AND
INDS_T000D_GEN_INFO.IND_SER_NO = INDS_T151D_WASTE_QTY.IND_SER_NO AND (INDS_T151D_WASTE_QTY.DANGER_QTY > 0)
GROUP BY INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR
SELECT INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR, COUNT(INDS_T000D_GEN_INFO.IND_SER_NO) AS NUMBER_EST
FROM INDS_T000D_GEN_INFO, INDS_ECONOMY_ACTIVITY_L4, INDS_T151D_WASTE_QTY
WHERE INDS_T000D_GEN_INFO.MAIN_ECO_ACT = INDS_ECONOMY_ACTIVITY_L4.CODE AND
INDS_T000D_GEN_INFO.YEAR = INDS_T151D_WASTE_QTY.YEAR AND
INDS_T000D_GEN_INFO.IND_SER_NO = INDS_T151D_WASTE_QTY.IND_SER_NO AND (INDS_T151D_WASTE_QTY.OTHER_QTY > 0)
GROUP BY INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_ARHI
IT WOULD BETTER IF U CAN
GIVE DETAILS ABOUT TABLES STRUCTURE USED
HOPE U CAN TRY THIS WAY
SELECT T2.INDS_ECONOMY_ACTIVITY_L4.CODE ,
(SELECT (REQUIRED COLUMN) FROM
(SELECT INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR, COUNT(INDS_T000D_GEN_INFO.IND_SER_NO) AS NUMBER_EST
FROM INDS_T000D_GEN_INFO, INDS_ECONOMY_ACTIVITY_L4 T1, INDS_T151D_WASTE_QTY
WHERE INDS_T000D_GEN_INFO.MAIN_ECO_ACT = INDS_ECONOMY_ACTIVITY_L4.CODE AND
INDS_T000D_GEN_INFO.YEAR = INDS_T151D_WASTE_QTY.YEAR AND
INDS_T000D_GEN_INFO.IND_SER_NO = INDS_T151D_WASTE_QTY.IND_SER_NO AND (INDS_T151D_WASTE_QTY.SOLID_QTY > 0)
GROUP BY INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR)
WHERE T1.INDS_ECONOMY_ACTIVITY_L4.CODE = T2.INDS_ECONOMY_ACTIVITY_L4.CODE) AS CODE,
(SELECT (REQUIRED COLUMN) FROM
(SELECT INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR, COUNT(INDS_T000D_GEN_INFO.IND_SER_NO) AS NUMBER_EST
FROM INDS_T000D_GEN_INFO, INDS_ECONOMY_ACTIVITY_L4 T1, INDS_T151D_WASTE_QTY
WHERE INDS_T000D_GEN_INFO.MAIN_ECO_ACT = INDS_ECONOMY_ACTIVITY_L4.CODE AND
INDS_T000D_GEN_INFO.YEAR = INDS_T151D_WASTE_QTY.YEAR AND
INDS_T000D_GEN_INFO.IND_SER_NO = INDS_T151D_WASTE_QTY.IND_SER_NO AND (INDS_T151D_WASTE_QTY.LIQUID_QTY > 0)
GROUP BY INDS_ECONOMY_ACTIVITY_L4.CODE, INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4,
INDS_ECONOMY_ACTIVITY_L4.ECONOMY_ACTIVITY_L4_AR)
WHERE T1.INDS_ECONOMY_ACTIVITY_L4.CODE = T2.INDS_ECONOMY_ACTIVITY_L4.CODE) AS EST1
FROM INDS_ECONOMY_ACTIVITY_L4 T2
I HAVE BOLDED THE CHANGES IF THIS GIVES CORRECT RESULT SIIMILARLY U CAN TRY FOR OTHERS
ELSE SORRY
REGARDS
S.NAGARAJ -
Choice of left or right outer join
Hi Experts,
I have a two tables like named as emp demo
desc emp
empname varchar2(50)
empid number
desc demo
empname varchar2(50)
empid number
when i implement the below quries i'm getting the same o/p.
queries like
select e.ename from emp e left outer join demo d on (e.empid=d.empid);
select e.ename from demo d right outer join emp e on (d.empid=e.empid);
In this case which query is most prefer
Thnks in advance
HHi,
943338 wrote:
Hi Experts,
I have a two tables like named as emp demo
desc emp
empname varchar2(50)
empid number
desc demo
empname varchar2(50)
empid number
when i implement the below quries i'm getting the same o/p.Right. You're getting the same error, because there is no ename column. If you change ename to empname, then you'll still get the same results, because
x LEFT OUTER JOIN y ON zis equivalent to
y RIGHT OUTER JOIN x ON zin results and performance.
queries like
select e.ename from emp e left outer join demo d on (e.empid=d.empid);
select e.ename from demo d right outer join emp e on (d.empid=e.empid);
In this case which query is most preferBoth are equally efficient.
Since most people never use RIGHT OUTER JOIN, it might make maintenance eaiser if you don't use it, either. I would use LEFT OUTER JOIN. -
How do u write a LEFT JOIN in Oracle Developer Forms 6i?
I have 2 tables:PERSDET and EMP_MEDICAL_LTA
PERSDET has EMP_ID,EMP_NAME n some other fields.
EMP_MEDICAL_LTA has EMP_ID,FIELD1,FIELD2 n some other fields
EMP_ID is the common field between these 2 tables.
My requirement is to display all the EMP_NAME,that is-EMP_NAME which have field1 and field2 entries, as well as EMP_NAME which donot have field1 and field2 entries. I thought of using a LEFT join for this operation. The query I used is as follows:
SELECT PERSDET.emp_id,PERSDET.emp_name,EMP_MEDICAL_LTA.field1,EMP_MEDICAL_LTA.field2 into emp_id,emp_name,m,l FROM
PERSDET LEFT JOIN EMP_MEDICAL_LTA ON PERSDET.emp_id=EMP_MEDICAL_LTA.EMP_ID
where <some other joining conditions>;
This query worked perfectly fine when I tried it running on the SQL prompt, but when I wrote it in a cursor in Oracle Forms 6i, it gave an error on the LEFT keyword!
Is there any substitute for LEFT JOIN in Oracle Forms 6i???
Please help!
Thanks!hi,
yes it is very much possible. and you query willbe as follows;
SELECT PERSDET.emp_id,PERSDET.emp_name,EMP_MEDICAL_LTA.field1,EMP_MEDICAL_LTA.field2 into emp_id,emp_name,m,l FROM
PERSDET where PERSDET.emp_id=EMP_MEDICAL_LTA.EMP_ID(+)
where <some other joining conditions>;
yse, you just have to use (+) symble on the side where the join condition is not fullfilled. the 2 possibilites for your qury is PERSDET.emp_id=EMP_MEDICAL_LTA.EMP_ID(+)
PERSDET.emp_id(+)=EMP_MEDICAL_LTA.EMP_ID
you can execute both and suit your self.
MohibMaan. -
Need Inventory Join conditions
Dear All,
I need join conditions on below tables....please help me....
MTL_SYSTEM_ITEMS, MTL_MATERIAL_TRANSACTIONS AND MTL_TRANSACTION_TYPES , MTL_CATEGORIES....
Kindly wating for reply.....
Regards..
krishna
Edited by: user12070109 on Dec 21, 2009 10:44 PM1) You can join MTL_SYSTEM_ITEMS, MTL_MATERIAL_TRANSACTIONS tables with inventory_item_id,
for example
select mmt.* from mtl_material_transactions mmt,mtl_system_items_b msi
where mmt.inventory_item_id=msi.inventory_item_id
And you can give the organization_id in above qury too if required.
2 ) Similarly you can join MTL_MATERIAL_TRANSACTIONS AND MTL_TRANSACTION_TYPES through
Transaction_type_id like
select mmt.* from mtl_material_transactions mmt,mtl_transaction_types mtt
where mmt.transaction_type_id=mtt.transaction_type_id
3) And for Item Categories there are two table
Mtl_categories_b :- This table contains the category Structures
And Mtl_item_categories: This table contains the inventory_item_id (which is linked to mtl_system_items_b with inventory_item_id) and category_id (which is linked to mtl_categories_b with category_id)
I hope this would be clearer for you. If you need more help then please reply.
If my response or the response of another was helpful, please mark it accordingly*
Thanks
Naveed -
Is it possible to use a IF statement (i.e. CASE, DECODE) in the Join Line?
I need create a query that depending on the value of a column it will determine if I use a column A or column B in my join statement. I was thinking something like the following:
Select a.Value1, a.Value2, b.ColumnA, b.ColumnB
FROM Table1 a
INNER JOIN Table2 b ON a.Value2 = (if b.ColumnZ='Dept' then b.ColumnA else b.ColumnB END)
Oracle Version 10g
OS Windows XP
Thanks in advance!Hi,
Remember what a CASE expression does: it returns a single value in one of the SQL data types (such as VARCHAR2, NUMBER or DATE).
Each THEN (or ELSE) clause of a CASE expression references something that the CASE expression might return, so after each THEN (or ELSE) keyword there must be a single value in one of the SQL data types.
So you can't say:
case tdsi.level_code
when 'L' then tdsid.privilege_code = tdlm.location_code
when 'R' then tdsid.privilege_code = tdlm.region_code
when 'C' then tdsid.privilege_code = tdlm.country_code
endWhat is the data type being returned? "tdsid.privilege_code = tdlm.location_code" is not a single value in any of the SQL data types.
If location_code, region_code, country_code and privilege_code all have the same data type, then you can do something like this:
join dirpipe.dirpipe_location_map tdlm on case tdsi.level_code
when 'L' then tdlm.location_code
when 'R' then tdlm.region_code
when 'C' then tdlm.country_code
end = tdsid.privilege_code -
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 -
Wrong display of No. of days worked in Payslip for mid-month joining
Dear Experts,
We use PE51, form editor for payslip for indian payrol. Our issue is when an employee joins mid of the month or say 4th of any month, still in payslip it shows no. of working days as 30/31 days instead of actual days worked. But pay results are correctly being calculated on factoring basis.
Please let me know how to resolve it, we use PCR ZNP1 for factoring which is written as follows
ZNP1 Partial factors for India - /801(CD), /802(WD), /803(WH),/804(Nom)
/801 Partial period factor 1
RTE=TKSOLL Set
RTE-TKAU** Subtraction
RTE*KGENAU Multiplication
RTE/TKDIVI Division
ADDWT * OT Output table
/802 Partial period factor 2
RTE=TASOLL Set
RTE-TAAU** Subtraction
RTE*KGENAU Multiplication
RTE/TADIVI Division
ADDWT * OT Output table
/803 Partial period factor 3
RTE=TSSOLL Set
RTE-TSAU** Subtraction
RTE*KGENAU Multiplication
RTE/TSDIVI Division
ADDWT * OT Output table
/804 Partial period factor 4
/805 Partial period factor 5
/806 Partial period factor 6
/807 Partial period factor 7
Please guide, if i need to modify it for getting correct working days display in payslip
Regards
Tanin that case the Requirement is to display no of working days of employee in a month
Here working days means
Total Calendar Days - Unpaid days - Paid days = working days ( please check the said one again since i have inculded the paid days and unpaid days if u want u can remove paid days)
so in order to fetch this
we need Calendar days that is TKSOLL
Unpaid days check the technical wage types /845 Paid days /846 ( you can have custom wage types too)
Copy a wage type from standrad overtime wage type that will be 1555
The PCR is as follows
NUM=TKSOLL (calendar Days)
NUM-E /846 Paid days
NUM-E /845
ADDWT 15555
Use ACTIO function and insert it any where in Sub Schema XT00 -
For the mid month new joiner the annual Conveyance exemption is coming incorrectly
Dear All,
For one of our client, we have have faced a uniqe issue.
If any employee join in the mid of the month, his prorated conveyance amount ( wage type 2020) is coming correctly. Suppose an employee joined at 16th of the month, system is calculating his conveyance for that month as INR 400 and which is correct.
However in his tax calculation for that particular month, system is taking INR 400*(rest of the month of the FY) in the wage type /4E3. which is incorrect. Suppose he joined in 16th April , system is calculating tax exemption 400*12=4800
Now if we run next month payroll , system is caculating the exemption properly. i.e. INR 400 + 800* rest of the month of the FY,
Please help
Regards
TirthaHi Tirtha,
system is calculating perfectly.
first of all system check the no. of present days and accordingly it give the amount in the wage type /3C3 conveyance amount monthly and /3C4 will give Conveyance monthly exemption and it will multiply with no. of months to the fiscal year end and store in the wage type /4E3.
for example check for PF:
Every month PF amount store in WT /3F1 and send to /3F5 and this WT multiplied with No. of months and store the Annual amount in wt /3F6.
Regards,
Praneeth kumar -
Mid Month Joining-PF Basis Calculation
Hi All,
I have an emplyee whose joining is in the 3rd week of the month 23.04.2011.
His basic is 25000, 8 days working basic is 6667.
I want to restrict his PF contribution to PF at 780 his actual contri coming as 800, 12% of basic.
Here i want that system should maintain his PF as 780 not 800.
I tried marking Eligible pay Or Pf BAsis Which ever is less but of no use.
I have already gone through the Threads which suggest to go through User Exit: Override Employer Pension Basis.But it is not for PF Basis.
If any PCR is available for the same ?
Can any body guide me on the same?Hi,
the system is working fine if the person is present in the trust the full month by selecting the Eligible Pay Or PF base pay
which ever is less.
But when it comes to joining in the end of the month say 23 or 25th of the month & the employee is present in the trust for 8 or 5 days & if i try to take the basic as 6500 although the basic is higher than 6500(actual basic 25000, ,8 days-6667),if i select the
Eligible Pay Or PF base pay which ever is less,either it doest take the 6500 consideration or it calculates PF as 208.
Puting the RT details here when Eligible Pay Or PF base pay which ever is less is selected.
/101 Total gross 11,223.33
/111 EPF Basis 6,666.67
/112 ESI Basis 11,223.33
/113 ESI Basis N 26,666.67 11,010.00
/114 HRA Basis 6,666.67
/115 COA/CLA Bas 9,973.33
/116 Gratuity Ba 6,666.67
/117 Superannuat 6,666.67
/120 Nom. ExGrat 26,666.67 6,666.67
/121 Nom. ExGrat 26,666.67 6,666.67
/124 Mon Reg Inc 9,973.33
/125 Mon Irr Inc 1,250.00
/128 Leave Encas 6,666.67
/129 Voluntary R 25,000.01
/134 Annual Non- 1,250.00
/136 1DSD Basis 6,666.67
/137 1DSD Basis 6,666.67
/138 Form 217 2( 11,223.33
/139 VPF Basis 6,666.67
/140 LWF Basis 6,880.00
/3F1 Ee PF contr0101 208.00
/3F3 Er PF contr0101 245.00
/3F4 Er Pension 0101 555.00
/3F5 Ee Mon PF c 208.00
/3F6 Ee Ann PF c 8,788.00
/3F7 EDLI contri0101 3,333,335.00
/3F8 EDLI adm ch0101 66,667.00
/3F9 PF adm chrg0101 7,333,337.00
/3FA PF basis fo0101 1,733.00
/3FB PF Basis fo0101 6,667.00
/3FC Pension Bas0101 6,667.00
/3FJ VPF basis f0101 1,733.00
/3FL PF Basis fo0101 6,667.00
/3I1 Deduction u 8,788.00
/3I2 Gross amoun 8,788.00 -
Hi
Is it possible to join an open path (created with the Pen Tool) to a close path (also created with the Pen Tool)?
Grechy01I want to create a complex piece of artwork by using line art created with the Pen Tool and color it by filling in the paths with the Live Paint Bucket. Anyway, I should be able achieve this with not much extra work by using overlapping closed paths, Average function (under Object --> Path) to align the point where the two closed paths cross, Pathfinder Merge function and multiple layers to remove the segments of the path that I don’t want and the Live Paint Bucket to color the artwork. If you can think of an easer way to do this please let me know.
-
Join is not working in webi report
I have let's say three tables; one fact and two dimensions;
I manually joined each dimension table with the fact with 1 to many cardinality...
Now I'm trying to run a test report using few fields from each dimension and it doesn't seem to join; in the SQL Viewer in Edit Query mode, it has two queries under Synchronization...it doesn't show a joined query between tables....
I have a similar setup in another universe that is out of the box solution and that seems to work just fine...
Am I missing something here...Please help!Hi Ahmed,
Along with the context that is present in your universe, check under the parameters the fifth tab i.e. the sql tab.
In this see whether the options are checked or not.
the options :
1.Multiple sql statements for each context.
2.Multiple sql statements for each measure.
Gaurav -
My wife and I have made many purchases over several years on seperate accounts, how could we join them into one account, without losing everything? We both use Iphone 5's and share an Imac at home.
Purchases using one Apple ID cannot be merged or transferred to another Apple ID. Purchases are forever tied to that Apple ID used. You have to decide which Apple you want to use for purchases and stick to that Apple ID so that you can share: Settings > iTunes & App Stores > Apple ID : > use the same Apple ID here to share purchases.
Maybe you are looking for
-
Payment Term default to Purchase Order
Dear SAP guru, We have problem that payment term is not defaulted to Purchase Order if the Purchase Order is converted from Purchase Requisition. If purchase order is directly created in ME21N, the payment term will be defaulted from vendor master. H
-
GR/IR automatic Blocking & Unblocking
Hi I have a couple of questions regarding the GR/IR automatic Blocking and Unblocking, Question 1 Scenario: Looking for Quantity Variance Purchase Order: Qty: 10Kg & Price: $20 [@ unit price $2/ 1kg] Goods Received: Qty: 6 Kg
-
Process does not end when binding a object to registry
I am writing a Unit Test case in which i need to create a datasource and bind it to RMI registry so that the methods i need to test can get a database connection . The problem is that after the test cases have finished running the process does not en
-
10.5.3 file names
Trying to change a document file name in a folder, after upping to 10.5.3, is iffy. I can highlight the name and select portions of the text in the name, but then nothing. Typing in a new name or an adjustment to a file name shows no response from th
-
When I first downloaded Firefox there was a tool bar at top of screen with print, yahoo and other items. Now it is gone. My question is this--how can I get it back?