How to use this query in R12
the query below , i am using in valueset :
select * from AR_LOCATION_VALUES
Where ar_location_values.location_segment_qualifier =
'COUNTRY' and ar_location_values.location_structure_id in ( select location_structure_id from ar_system_parameters )
how to use this query to set in R12?
Thanks
hi
i am using the following query in 11i and i want to use the same in R12 :
SELECT ar_location_values.location_segment_description,ar_location_values.location_segment_value,location_segment_id
FROM AR_LOCATION_VALUES
WHERE ar_location_values.location_segment_qualifier = 'COUNTRY'
AND ar_location_values.location_structure_id IN
(SELECT location_structure_id FROM ar_system_parameters)
note: the table ar_location_values is obsolette in R12 so what is the replacement table in R12 for this?
Similar Messages
-
How to use this query in oracle?
Hi sir,
i am using one query in sql that is
declare @date date='2012-10-25', @date1 varchar(5)
set @date1 = DATEPART(W, @date)
print @date1
in that its returning value 5 means 25 oct day is thursday so it's checking and counting from sunday in that week so the result is coming 5.
and storing in @date1
the same result i want it in oracle.
thanksTo_char(date,'D') conversion depends on setting of nls_territory.
So in AMERICA the week starts on sunday and in GERMANY it starts on monday.
Of cause, the solution of ranit B will work with proper setting of nls_territory.
You can check the setting of nls_parameters with
select * from v$nls_parameters;Alternatively here is a solution that is independent of nls_territory with starting day sunday:
SELECT 1+ mod(1 + TRUNC (to_date('2012-10-25','YYYY-MM-DD')) - TRUNC (to_date('2012-10-25','YYYY-MM-DD'), 'IW'),7) AS d
FROM dual;
D
5If you want a nls_territory independent solution with starting day monday you can use:
SELECT 1+ mod(TRUNC (to_date('2012-10-25','YYYY-MM-DD')) - TRUNC (to_date('2012-10-25','YYYY-MM-DD'), 'IW'),7) AS d
FROM dual;
D
4Edited by: hm on 04.10.2012 22:26 -
How to use Add Query Criteria for the MySQL data Base in Netbeans ?
How to use Add Query Criteria for the MySQL data Base in Netbeans Visual web pack.
When the Query Criteria is add like
SELECT ALL counselors.counselors_id, counselors.first_name, counselors.telephone,counselors.email
FROM counselors WHERE counselors.counselors_id = ?
when i run this Query in the Query Window
i get a error message Box saying
Query Processing Error Parameter metadata not available for the given statement
if i run the Query with out Query Criteria its working fine.*I am glad I am not the only one who have this problem. Part of issue has been described as above, there are something more in my case.
Whenever I try to call ****_tabRowSet.setObject(1, userDropList.getSeleted()); I got error message as shown below:*
The Java codes are:
public void dropDown1_processValueChange(ValueChangeEvent event) {
Object s = this.dropDown1.getSelected();
try {
this.User_tabDataProvider1.setCursorRow(this.User_tabDataProvider1.findFirst("User_Tab.User_ID", s));
this.getSessionBean1().getTrip_tabRowSet1().setObject(1, s);
this.Trip_tabDataProvider1.refresh();
} catch (Exception e) {
this.log("Error: ", e);
this.error("Error: Cannot select user"+e.getMessage());
SQL statement for Trip_tabRowSet:
SELECT ALL Trip_Tab.Trip_Date,
Trip_Tab.User_ID,
Trip_Tab.Destination
FROM Trip_Tab
WHERE Trip_Tab.User_ID = ?
Error messages are shown below:
phase(RENDER_RESPONSE 6,com.sun.faces.context.FacesContextImpl@5abf3f) threw exception: com.sun.rave.web.ui.appbase.ApplicationException: java.sql.SQLException: No value specified for parameter 1 java.sql.SQLException: No value specified for parameter 1
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.cleanup(ViewHandlerImpl.java:559)
com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.afterPhase(ViewHandlerImpl.java:435)
com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:274)
com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
tandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.sql.SQLException: No value specified for parameter 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1674)
at com.mysql.jdbc.PreparedStatement.fillSendPacket(PreparedStatement.java:1622)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1332)
at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:193)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:979)
at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1439)
at com.sun.data.provider.impl.CachedRowSetDataProvider.checkExecute(CachedRowSetDataProvider.java:1274)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorRow(CachedRowSetDataProvider.java:335)
at com.sun.data.provider.impl.CachedRowSetDataProvider.setCursorIndex(CachedRowSetDataProvider.java:306)
at com.sun.data.provider.impl.CachedRowSetDataProvider.getRowCount(CachedRowSetDataProvider.java:639)
at com.sun.webui.jsf.component.TableRowGroup.getRowKeys(TableRowGroup.java:1236)
at com.sun.webui.jsf.component.TableRowGroup.getFilteredRowKeys(TableRowGroup.java:820)
at com.sun.webui.jsf.component.TableRowGroup.getRowCount(TableRowGroup.java:1179)
at com.sun.webui.jsf.component.Table.getRowCount(Table.java:831)
at com.sun.webui.jsf.renderkit.html.TableRenderer.renderTitle(TableRenderer.java:420)
at com.sun.webui.jsf.renderkit.html.TableRenderer.encodeBegin(TableRenderer.java:143)
at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
at com.sun.webui.jsf.component.Table.encodeBegin(Table.java:1280)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
at com.sun.faces.application.ViewHandlerImpl.doRenderView(ViewHandlerImpl.java:271)
at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:182)
at com.sun.rave.web.ui.appbase.faces.ViewHandlerImpl.renderView(ViewHandlerImpl.java:285)
at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:133)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:140)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at com.sun.webui.jsf.util.UploadFilter.doFilter(UploadFilter.java:240)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:216)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:184)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:276)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
Also when I tried to update my MYSQL connector / J driver to version 5.1.5 from 5.0.5 (NB 5.5.1) and 5.0.7 (NB 6.1), I could not get it work (looooong time to search some JDBC classes and with no response in the end) on both of my Netbean 5.5.1(on PC) and Netbean 6.1(on laptop) IDEs.
Could anybody look into this issue.
Many thanks
Edited by: linqing on Nov 22, 2007 4:48 AM -
How to use WEB ADI in R12 project accounting- Need urget
Hi Friends,
How to use WEB ADI in R12 for project accounting, right now iam working in a client place, i need to show demo on WEB ADI functionality in project accounting.
Iam trying in different ways, it is showing error msgs, if any body have WEB ADI R12 exp, please guide me.
I need to upload manual transactions through WEB ADI..
What are the setups need to do, i have user guide but unable to solve my probelm..
It is very urgent to me, please reply..
Thanks,
Srini
Message was edited by:
user620419Ravichandran wrote:
Hi,
Set the DQM Synchronization Method to "Batch" and it should solve your issue(Please note that this depends on whether you are using TCA)
Regards,
RaviHi Ravi,
Thanks for replying this post. I had almost lost hope.
As you suggested above, I tried to set the DQM Synchronization Method Profile Option to Batch using System Administrator responsibility but could not as the Profile Option is read only at all levels- Site, Application, Responsibility,User,etc. Please what am I doing wrong ? Thanks
-Ibrahim -
How to modify this query to get the desired output format
I hv written a Query to display all the parent table names and their primary key columns(relevant to this foreign key of the child table).The query is given below...
SELECT DISTINCT(TABLE_NAME) AS PARENT_TABLE,COLUMN_NAME AS PARENT_COLUMN
FROM ALL_CONS_COLUMNS
WHERE CONSTRAINT_NAME IN (SELECT AC.R_CONSTRAINT_NAME
FROM ALL_CONSTRAINTS AC
WHERE AC.TABLE_NAME=TABLE_NAME
AND AC.TABLE_NAME='&TABLE'
AND AC.R_CONSTRAINT_NAME IS NOT NULL);
This query will display all the parent tables and their primary key columns.Now my problem is that how to modify this query to also display the foreign key column name of the child table.
I want the query result in the following format.The query should display the following columns.1)child table's name,2)child table's foreign key column name,3)the corresponding parent table's name,4)the parent table's primary key column name(which is the foreign key in the child table).
For Example I want the output as follows...
TAKE THE CASE OF SCOTT.EMP(AS INPUT TO YOUR QUERY)
CHILD_TABLE CHILD_COLUMN PARENT_TABLE PARENT_COLUMN
EMP DEPTNO DEPT DEPTNO
In this result I hv used alias name for the columns.The query should display this only for the foreign keys in the child table.In the query which I sent to you earlier will give the parent table and the parent column names,But I also want to append the child table and child column names there.
any help on how to tackle would be appreciated.Try this query
SELECT c.table_name child_table,
c.column_name child_column,
p.table_name parent_table,
p.column_name parent_column
FROM user_constraints a,user_constraints b,user_cons_columns c,
user_cons_columns p
WHERE a.r_constraint_name=b.constraint_name and
a.constraint_name=c.constraint_name and
b.constraint_name=p.constraint_name and
c.position=p.position
ORDER BY c.constraint_name,c.position
Anwar -
hi,
i have a product table like
product month1 month2 month3 .................
soap 1200 1256 1895 ............
i want use a query where i can select column name with a parameter.
like
select month||:num from product;
in num variable it cud be 1 to 10 of value that is dependent on my program.
so how to make this query .
thxsHi,
Here is an example that i am helpful.
In the example , I am using a table 'table_name' which contains columns like
assign_attribute1
assign_attribute2
assign_attribute15
Now I will pass any number from 1 to 15 to the function.
create or replace procedure pass_col_number(v_number varchar2) as
v_sql varchar2(2000);
v_assign_attribute1 varchar2(150);
begin
v_sql := 'select assign_attribute'||v_number||' from table_name where person_id = 1345';
execute immediate v_sql into v_assign_attribute1;
dbms_output.put_line('v_assign_attribute1='||v_assign_attribute1);
end;Edited by: Sreekanth Munagala on Dec 18, 2008 1:18 AM -
How to tune this query for the improve performance ?
Hi All,
How to tune this query for the improve performance ?
select a.claim_number,a.pay_cd,a.claim_occurrence_number,
case
when sum(case
when a.payment_status_cd ='0'
then a.payment_est_amt
else 0
end
)=0
then 0
else (sum(case
when a.payment_status_cd='0'and a.payment_est_amt > 0
then a.payment_est_amt
else 0
end)
- sum(case
when a.payment_status_cd<>'0'
then a.payment_amt
else 0
end))
end as estimate
from ins_claim_payment a
where a.as_of_date between '31-jan-03' and '30-aug-06'
and ( a.data_source = '25' or (a.data_source between '27' and '29'))
and substr(a.pay_cd,1,1) IN ('2','3','4','8','9')
group by a.claim_number, a.pay_cd, a.claim_occurrence_number
Thank you,
MckaMcka
As well as EXPLAIN PLAN, let us know what proportion of rows are visited by this query. It may be that it is not using a full table scan when it should (or vice versa).
And of course we'd need to know what indexes are available, and how selective they are for the predicated you have in this query ...
Regards Nigel -
How to write this query to filter combination of few values
Hi,
I have a table CHIMM which is a transaction table and contains information of the vaccines given to a child.
columns are: child_id, vacc_id, vacc_given_dt. I have to query for remaining vaccines.
HEXA is a vaccine_id which is composite vaccine of DPT1,POL1,HBV1 & HIB1 (vaccine ids).
I want to write to query if any of DPT1,POL1,HBV1 & HIB1 given then HEXA should not be displayed in the result.
OR
if HEXA is given then of course any of DPT1,POL1,HBV1 & HIB1 should not be displayed in the result.
How to write this query?
RegardsHi,
I'm still not sure what the output you want from that sample data is. Do you just want the child_ids, like this
CHILD_ID
3
4? If so, here's one way to get them:
WITH all_vacc_ids AS
SELECT c.child_id
, c.vacc_id AS child_vacc_id
, v.vacc_id
, COUNT ( CASE
WHEN c.vacc_id = 'HEXA'
THEN 1
END
) OVER ( PARTITION BY c.child_id
) AS hexa_itself
FROM vacc v
LEFT OUTER JOIN chimm c PARTITION BY (c.child_id)
ON c.vacc_id = v.vacc_id
WHERE v.vacc_desc = 'HEXA' -- See note below
SELECT child_id
FROM all_vacc_ids
WHERE child_vacc_id IS NULL
AND vacc_id != 'HEXA'
AND hexa_itself = 0
GROUP BY child_id
rha2 wrote:there are alot of vaccines, i just put 3 for example. this query gives error: invalid relational operatorAre you saying that the vacc table contains other rows, but those other rows are not needed for this problem? It would be good if you included an example in the sample data. The query above considers only the rows in vacc where vacc_desc='HEXA'. You can have other rows in the vacc table, but they won't affect the output of this query. The query above makes no assumptions about the number of rows that have vacc_desc='HEXA'; it will report all child_ids who are missing any of them, regardless of the number (assuming the child does not have the 'HEXA' vacc_id itself, like child_id=1).
You still haven't said which version of Oracle you're using. The query above will work in Oracle 10 (and higher). -
How to write this query ?
how to write this query ?
list the emp name who is working for the highest avg sal department.
I can use row_number over to get correct result. If we don't use this row_number function, just plain sql, how to do it ?
the row_number version is like this
select emp.* from emp ,
select deptno, row_number() over (order by avg(sal) desc) r from emp
group by deptno
)e
where e.r = 1
and emp.deptno = e.deptnoHi,
806540 wrote:
how to write this query ?
list the emp name who is working for the highest avg sal department.
I can use row_number over to get correct result. If we don't use this row_number function, just plain sql, how to do it ?ROW_NUMBER is just plain SQL, and has been since Oracle 8.1.
ROW_NUMBER (or its close relative, RANK) is the simplest and most efficient way to solve this problem. Why not do this the right way?
the row_number version is like this
select emp.* from emp ,
select deptno, row_number() over (order by avg(sal) desc) r from emp
group by deptno
)e
where e.r = 1
and emp.deptno = e.deptno
If there happens to be a tie (that is, two or more departments have the same average sal, and it is the highest), then the query above will only arbitrarily treat one of them (no telling which one) as the highest. Change ROW_NUMBER to RANK to get all departments with a claim to having the highest average sal.
You could use the ROWNUM pseudo-column instead of ROW_NUMBER, if all you want to do is avoid ROW_NUMBER.
Without using ROW_NUMBER or RANK, there are lots of ways involving other analytic functions, such as AVG and MAX.
If you really, really don't want to use analytic functions at all, you can do this:
SELECT *
FROM scott.emp
WHERE deptno IN (
SELECT deptno
FROM scott.emp
GROUP BY deptno
HAVING AVG (sal) = (
SELECT MAX (AVG (sal))
FROM scott.emp
GROUP BY deptno
; -
In this report i have marked one line..if this width < 30,i need to multiply by a number 0.3 and if the width >=30,it multiplies by 0.37...how to use this logic here..??? anyone can help??
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @SCCode nvarchar(30)
select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
--Rcpt from PRDN (Condition checked for Return component exclusion also)
SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'FG Item Code',
T3.ItemName as 'FG Item Name',
T2.PlannedQty as 'FG Planned Qty',
T2.U_OD as 'OD',
T2.U_ID as 'ID',
T2.U_OD/25.4 as 'Inches',
(T2.U_OD-T2.U_ID)/2 as 'Width',
0 as 'FG Pending Qty',
0 as 'FG Receipt Qty',
'' as 'Issue Item Code',
'' as 'Issue Item Name',
Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
0 as 'Issue Item - Return Quantity',
'' as 'Return Doc No',
SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode not in (a.ItemCode)
LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode INNER JOIN OIGN d on c.DocEntry = d.DocEntry
WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID, T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2
UNION ALL
SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'Item Code',
T3.ItemName as 'Item Name',
T2.PlannedQty as 'Planned Qty',
T2.U_OD as 'OD',
T2.U_ID as 'ID',
T2.U_OD/25.4 as 'Inches',
(T2.U_OD-T2.U_ID)/2 as 'Width',
(Select (T2.PlannedQty - (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum))) as 'Pending Qty',
(Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum) as 'Receipt Qty',
a.ItemCode as 'Issued Item Code',
a.Dscription as 'Issued Item Name',
Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
(Select (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode))) as 'Issue Item - Return Quantity',
(ISNULL((Select (Select a2.DocNum from OIGN a2 where a2.DocEntry = a1.DocEntry) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode)),'')) as 'Return Doc No',
SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode in (a.ItemCode)
LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode LEFT JOIN OIGN d on c.DocEntry = d.DocEntry
WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID,T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2,a.ItemCode,a.Dscription order by T2.DocNum descHi,
Try this:
Declare @FromDate Datetime
Declare @ToDate Datetime
Declare @SCCode nvarchar(30)
select @FromDate = min(S0.Docdate) from dbo.OINM S0 where S0.Docdate >='[%0]'
select @ToDate = max(S1.Docdate) from dbo.OINM s1 where S1.Docdate <='[%1]'
--Rcpt from PRDN (Condition checked for Return component exclusion also)
SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,
T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'FG Item Code',T3.ItemName as 'FG Item Name',T2.PlannedQty as 'FG Planned Qty',T2.U_OD as 'OD',T2.U_ID as 'ID',T2.U_OD/25.4 as 'Inches',(T2.U_OD-T2.U_ID)/2 as 'Width',case when ((T2.U_OD-T2.U_ID)/2) <30 then ((T2.U_OD-T2.U_ID)/2) *0.3 end, 0 as 'FG Pending Qty',0 as 'FG Receipt Qty','' as 'Issue Item Code','' as 'Issue Item Name',Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',0 as 'Issue Item - Return Quantity','' as 'Return Doc No',SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntryINNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCodeLEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode not in (a.ItemCode)LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode INNER JOIN OIGN d on c.DocEntry = d.DocEntryWHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,T2.PlannedQty,T2.U_OD,T2.U_ID, T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2UNION ALL SELECT T2.U_STKNO as 'PRN No', T2.PostDate as Date,T2.DocNum AS 'WorkOrderNo',
b.DocNum as 'Issue Doc No',
ISNULL(d.DocNum,'') as 'Receipt Doc No',
b.U_IssPSCName as 'SubContractor Name',
T2.ItemCode as 'Item Code',T3.ItemName as 'Item Name',T2.PlannedQty as 'Planned Qty',T2.U_OD as 'OD',T2.U_ID as 'ID',T2.U_OD/25.4 as 'Inches',(T2.U_OD-T2.U_ID)/2 as 'Width',case when ((T2.U_OD-T2.U_ID)/2) >=30 then ((T2.U_OD-T2.U_ID)/2) *0.37 end, (Select (T2.PlannedQty - (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum))) as 'Pending Qty',(Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum and a1.ItemCode in (b1.itemcode) where b1.DocNum = t2.DocNum) as 'Receipt Qty',
a.ItemCode as 'Issued Item Code',
a.Dscription as 'Issued Item Name',
Sum(ISNULL(a.Quantity,0)) as 'Total Issue Quantity',
(Select (Select ISNULL(sum(a1.Quantity),0) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry
where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode))) as 'Issue Item - Return Quantity',
(ISNULL((Select (Select a2.DocNum from OIGN a2 where a2.DocEntry = a1.DocEntry) from IGN1 a1 inner join OWOR b1 on a1.BaseRef = b1.DocNum inner join WOR1 b2 on b1.DocEntry = b2.DocEntry where b1.DocNum = t2.DocNum and a1.ItemCode in (b2.itemcode)),'')) as 'Return Doc No',
SUM(ISNULL(a.U_IssPTotWeight,0)) as 'Total Issue Weight',
SUM(ISNULL(c.U_Quantity,0)) as 'Total Receipt Weight'
from OWOR T2 inner join WOR1 T4 on T2.DocEntry = T4.DocEntry
INNER JOIN OITM T1 ON T1.ItemCode = T4.ItemCode inner join OITM T3 on T3.ItemCode = T2.ItemCode
LEFT join IGE1 a on T2.DocNum = a.BaseRef Inner JOIN OIGE b on a.DocEntry = b.DocEntry and T4.ItemCode in (a.ItemCode)
LEFT JOIN IGN1 c ON c.BaseRef = T2.DocNum and T2.ItemCode = c.ItemCode LEFT JOIN OIGN d on c.DocEntry = d.DocEntry
WHERE b.Series in('101','20') and T2.PostDate >= @FromDate and T2.PostDate <= @ToDate and b.U_IssPSCName = '[%2]'
GROUP BY T2.U_STKNO, T2.PostDate, T2.DocNum, b.DocNum, d.DocNum, b.U_IssPSCName,T2.ItemCode,T3.ItemName,
T2.PlannedQty,T2.U_OD,
T2.U_ID,T2.U_OD/25.4,(T2.U_OD-T2.U_ID)/2,a.ItemCode,a.Dscription
order by T2.DocNum desc
Thanks & Regards,
Nagarajan -
How to use sql query in java ?
i don't know how to use sql query in java code.
who can give me some advice?
thankshttp://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/
-
How to use a query in matrix data retrive
hai everybody
how to use a query in matrix data retrive...
pls ..If u have created a UDT to store the data then U can retrive the data through recordset.
oRecordset.doquery("SQL Statement")
If u have taken the DB Data source to Manipulate then
then type
oMatrix.flushtoDataSource
then
U can retrive the data through DB Data source.
-Manmath -
How to use this function in crm5.2 - /CEM/ENT_IMPORT_DATAFROMEXCEL
i am having a problem regarding how to use this function to import values from an excel sheet.
in call funtion what to specify at place of ct_ent_action = ?
CALL FUNCTION '/CEM/ENT_IMPORT_DATAFROMEXCEL'
CHANGING
CT_ENT_ACTION =
EXCEPTIONS
FILE_ERROR = 1
IMPORT_ERROR = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.Hi
The use of Standard Parner functions are as follows:
1. Ordering Address (OA): The PO will be sent this vendor and not the main vendor.
2. Goods Supplier (WL): In case of return deliveries, Goods will be returned to thsi vendor's address
3. Invoicing party (RS): The payment will be made to this vendor.
Hope this clarifies.
Thansk -
Emicsoft HD Video Converter is the high definition video converter software develeped to convert HD video files with high quality. With this HD video converter you can also easily convert between HD video formats, convert standard definition videos to HD videos, or convert HD videos to SD (Standard-Definition) videos. The HD video converter supports most of HD video formats: MTS/M2TS, TS, HD MKV, HD AVI, HD MP4, HD WMV, HD MOV, HD ASF.
How to use this HD Converter?
1. Launch the software and click "Add File" button to import files into the software. You can watch them on the preview screen.
2. Edit the added movie by clicking "Effect" "Trim" or "Crop" button which can help you create unique videos easily.
3. Select output in Profile option. Here all popular formats and mobile devices are supported. Then make sure the destination folder.
4. Click "Start" button and the program will automatically start conversion.
Emicsoft AVCHD Converter can convert AVCHD video to all popular video formats, and convert other videos to AVCHD video. So many formats are supported such as HD video (TS, MTS, M2TS, HD MPEG-4, HD MOV, HD AVI, HD VOB, HD ASF, HD WMV, etc.), general video (AVI, MP4, WMV, MPEG-1, MPEG-2, VOB, MOV, 3GP, FLV, SWF, etc.) and audio track (MP3, WMA, WAV, AAC, AC3, OGG, etc.).
Emicsoft MOD Converter is a powerful MOD video converter which can MOD to AVI, MOD to MPG, MOD to MPEG, MOD to WMV and to other video format, such as FLV, SWF, ASF, DivX, XviD, MP4, VCD, SVCD, DVD-Video, VOB and so on. Batch conversion supported, so you can add several .MOD files one time.
More softwares may help you:
Emicsoft Video Converter
Emicsoft FLV Converter
Emicsoft MTS ConverterThis is not a simple issue. You can set up a network, and set up sharing on the Mini, so that other computers on the same network can read and write to the external hard drive connected to the Mini.
To do that you have to get both computers on the network first, then set up the external hard drive so others can read on and write to it.
Is that what you want to do? If yes, and yu need help with this, please post back.
If you want to store apps on the external, and run them from a networked Mac, that is a whole other issue. To do that you need to set up the Mini to be a network server:
https://www.apple.com/ca/mac-mini/server/
Please post back, because I'm not sure I'm answering your questions. -
How to Use SQL Query having IN Clause With DB Adapter
Hi,
I am using 11.1.1.5 want to find out how to Use SQL Query having IN Clause With DB Adapter. I want to pass the IN values dynamically. Any ideas.
Thanksinvoke a stored procedure, it's safer than trying to put together an arbitrary SQL statement in the JCA adapter
Maybe you are looking for
-
Sound input issues. Not related to Soundflower or Balance issues
So. With the sound flower issues fixed. And my balance knobs in place for my stereo speakers. I have opened up a new song I have been writing. Again the AVIGrandpiano app was the track I was recording on. Like my previous post from last week the
-
In which way i can know that a job is running In background or foreground?
Hi, In which way i can know that a job is running In background or foreground? please tell me... or a report is in background or foreground.. Thanks , Arya
-
Hello, I know this is not the right forum to ask this question, but most of the unix gurus using this forum will have a answer. I installed solaris 8(intel) on a PII box, will the technet oracle software(like 9iASr2, 9iDBR2) will work in intel versio
-
Security issue: parameters username and password in the jbo:ApplicationModule
Hello, in the <jbo:ApplicationModule> tag, you can give parameters for username and password, Then the .jsp connects to the DB via the username/password. Alternativly, You can provide this within the <Module>.properties file. Now the question: Isn't
-
hi gurus While uploading data into ODS by flat file got error : ORA-14400: inserted partition key does not map to any partition Cause: An attempt was made to insert a record into, a range or composite range object, with a concatenated partition key t