Query shows results as "??".....
My database is in:
SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
SQL> SELECT value$ FROM sys.props$ WHERE name = 'NLS_CHARACTERSET' ;
VALUE$
WE8ISO8859P1
SQL>
There are some queries that when run, outputs as "??". In other words, we are expecting to see chinese characters and we see
?? instead.
Is this related to the above?
thanks
WE8ISO8859P1 cannot store oriental characters. You will need to convert the database characterset to AL32UTF8. Pl see these MOS Docs
Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) (Doc ID 260192.1)
AL32UTF8 / UTF8 (Unicode) Database Character Set Implications (Doc ID 788156.1)
This is not a trivial exercise
HTH
Srini
Similar Messages
-
Discoverer Report showing Null VS Show SQL query showing results !!!
I created a simple Cross Tab Discoverer report from a custom SQL which has a calculation for balances. The output is giving all null values even though there are balances. The output doesn't seem right. So I copied the query from Tools-->Show SQL and ran the query in the TOAD where I'm showing balances for the report. I don't understand why it is not showing in the discoverer. Please help.
Thanks
Edited by: PA1B on Jan 27, 2010 11:40 AMSorry for late reply.
Below is the Show SQL query. I don't think the query is application dependent. C_1 is my calculation.
SELECT o279709.SEGMENT3 as E279727,
o279709.SEGMENT4 as E279728,
CASE WHEN o279709.CURRENCY_CODE = 'USD' AND o279709.TRANSLATED_FLAG <> 'Y' THEN SUM(o279709.ENDING_BAL) ELSE 0 END as C_1,
GROUPING_ID(o279709.CURRENCY_CODE,o279709.SEGMENT3,o279709.SEGMENT4,o279709.TRANSLATED_FLAG) as GID
FROM ( --Foriegn Entity USD Balances
SELECT B.SEGMENT1,
B.SEGMENT2,
B.SEGMENT3,
(select distinct substr(cat.COMPILED_VALUE_ATTRIBUTES,5,1) from apps.fnd_flex_values cat
where FLEX_VALUE_SET_ID = (select bat.FLEX_VALUE_SET_ID from apps.fnd_id_flex_structures_vl aat, apps.fnd_id_flex_segments_vl bat
where bat.id_flex_code = 'GL#' and
bat.id_flex_code = aat.id_flex_code and
aat.APPLICATION_ID = bat.APPLICATION_ID and
aat.APPLICATION_ID = 101 and
bat.SEGMENT_NAME = 'Prime Account' and
aat.id_flex_num = bat.id_flex_num
and bat.id_flex_num in (select distinct chart_of_accounts_id from apps.gl_code_combinations gat
where gat.code_combination_id = A.code_combination_id))
and cat.flex_value = b.segment3) ACCT_TYPE ,
B.SEGMENT4,
B.SEGMENT5,
B.SEGMENT6,
B.SEGMENT7,
B.SEGMENT8,
B.SEGMENT9,
B.SEGMENT10,
B.SEGMENT11,
B.SEGMENT12,
B.SEGMENT13,
C.NAME,
A.SET_OF_BOOKS_ID,
A.CURRENCY_CODE,A.TRANSLATED_FLAG,
SUM(NVL(A.BEGIN_BALANCE_DR,0) - NVL(A.BEGIN_BALANCE_CR,0)) BEG_BAL,
SUM(NVL(A.PERIOD_NET_DR,0)) DEBITS,
SUM( NVL(A.PERIOD_NET_CR,0)) CREDITS ,
A.PERIOD_NAME,
SUM(NVL(A.BEGIN_BALANCE_DR,0) - NVL(A.BEGIN_BALANCE_CR,0))+ SUM(NVL(A.PERIOD_NET_DR,0) - NVL(A.PERIOD_NET_CR,0)) ENDING_BAL
FROM APPS.GL_BALANCES A ,
APPS.GL_CODE_COMBINATIONS B,
APPS.GL_SETS_OF_BOOKS C
WHERE A.CODE_COMBINATION_ID = B.CODE_COMBINATION_ID
--AND A.PERIOD_NAME = 'SEP-09'
AND C.SET_OF_BOOKS_ID = A.SET_OF_BOOKS_ID
--AND A.TRANSLATED_FLAG <> 'Y'
--AND B.SEGMENT1 = '83101'
--AND B.SEGMENT3 = '14602'
--AND A.SET_OF_BOOKS_ID = 77
--AND A.CURRENCY_CODE = 'USD'
GROUP BY A.CODE_COMBINATION_ID,
B.SEGMENT1,
B.SEGMENT2,
B.SEGMENT3,
B.SEGMENT4,
B.SEGMENT5,
B.SEGMENT6,
B.SEGMENT7,
B.SEGMENT8,
B.SEGMENT9,
B.SEGMENT10,
B.SEGMENT11,
B.SEGMENT12,
B.SEGMENT13,
A.CURRENCY_CODE,
A.TRANSLATED_FLAG,
C.NAME,A.PERIOD_NAME,
A.SET_OF_BOOKS_ID
) o279709
WHERE (o279709.PERIOD_NAME = 'DEC-09')
AND (o279709.SET_OF_BOOKS_ID <> 72)
AND (o279709.SEGMENT12 = '000')
AND (o279709.SEGMENT3 IN ('10101','10301','10502','12001'))
AND (o279709.SEGMENT1 IN ('82901','82902','82903','83001','83003','83201'))
GROUP BY GROUPING SETS(( o279709.CURRENCY_CODE,o279709.SEGMENT3,o279709.SEGMENT4,o279709.TRANSLATED_FLAG ),( o279709.SEGMENT3,o279709.SEGMENT4 ),( o279709.SEGMENT3 ))
HAVING (GROUP_ID()=0)
ORDER BY GID DESC;
Thanks,
PA1
Edited by: PA1B on Jan 29, 2010 12:50 PM -
Results web part showing results before search query is typed in search box
2 part question
I am creating a wiki site in which the home page has a search box web part, and a results web part. I have the search box configured to return the results to the results web part. I created a result source and changed the query on the results
web part to use this results source. I am getting results from the library I am trying to, but...
1) The results web part is showing results when the page is loaded before any query is typed into the search bar. Why is this and can it be configured to just be blank until a query is entered into the search bar?
2) Is it possible to have 1 search box and 1 results part have 2 different scope choices? ie, 1 scope for the wiki library and 1 for a document library?
Thank you.So I have to have 2 different search result web parts to have 2 different scopes if I wish to have the search and results occur on the same page? Would I also have to have 2 search boxes?
Also, I am trying to figure out this issue where results are being returned without anything being entered in the search box. I have {searchterms?} in my query, and documentation suggests this to be the way to handle this issue, but I continue to get
results shown in the results web part without even entering a search query. Please assist. -
How To Make Search Query Showing the Result As List of Buttons.
Can some one give me an idea how to start to make a Search Query showing the results as list of buttons.. i have already have my buttons with names. i just dont know how to make a search query.
this is my on screen keyboard i made..
im making a system that the result were a list of buttons.. showing like this
This was supposed to be the output of the query that i need to do..
Please help me.. i just need a idea or tips how to make this one.Here is code I posted recently for another question
Public Class Form1
Const BUTTON_SIZE As Integer = 20
Const SPACE As Integer = 5
Sub New()
' This call is required by the Windows Form Designer.
InitializeComponent()
' Add any initialization after the InitializeComponent() call.
Dim buttons As New List(Of List(Of MyRadioButton))
For row = 1 To 6
Dim newRow As New List(Of MyRadioButton)
buttons.Add(newRow)
For col = 1 To 6
Dim button As New MyRadioButton()
button.row = row
button.col = col
button.Height = BUTTON_SIZE
button.Width = BUTTON_SIZE
button.Left = col * (BUTTON_SIZE + SPACE)
button.Top = row * (BUTTON_SIZE + SPACE)
button.Name = String.Format("radGr1{0}_{1}", row.ToString(), col.ToString())
Me.Controls.Add(button)
newRow.Add(button)
AddHandler button.CheckedChanged, AddressOf Radio_Change
Next col
Next row
End Sub
Private Sub Radio_Change(ByVal sender As Object, ByVal e As System.EventArgs)
Dim button As MyRadioButton = CType(sender, MyRadioButton)
Dim row As Integer = button.row
Dim col As Integer = button.col
End Sub
End Class
Public Class MyRadioButton
Inherits RadioButton
Public row As Integer
Public col As Integer
End Class
jdweng -
Problem with store ResultSet and show result in table
Hi, I'm kind of new in ADF, I need to store ResultSet and show result in table-component. I have two problems:
1) I get my ResultSet by calling callStoredProcedure(...) and this returns actually ref_cursor as ResultSet.
When I try to println() contains of this result set in this method - it works OK (commented part),
but when I want to println() somewhere else (eg. in retrieveRefCursor() method) it doesn't work.
The problem is that the scrollability of the ResultSet is lost - it becomes a TYPE_FORWARD_ONLY ResultSet.
Is there any way to store data from ref_cursor for a long time?
2) My second problem is "store any result set and show this data in table". I have tried use method storeNewResultSet() but
without result (table contains only "No rows yet" and everything seems to be OK - no exception, no warning, no error...).
I have tried to call this method with ResultSet from select on dbs (without resultSet as ref_cursor ) - no result with createRowFromResultSet(),
storeNewResultSet(), setUserDataForCollection()...
I've tried a lot of ways to do this, but it doesn't work. I really don't know how to make it so it can work.
Thanks for your help.
ADF BC, JDev 11.1.1.0
This is my code from ViewObjectImpl
package tp.model ;
import com.sun.jmx.mbeanserver.MetaData ;
import java.sql.CallableStatement ;
import java.sql.Connection ;
import java.sql.PreparedStatement ;
import java.sql.ResultSet ;
import java.sql.ResultSetMetaData ;
import java.sql.SQLException ;
import java.sql.Statement ;
import java.sql.Types ;
import oracle.jbo.JboException ;
import oracle.jbo.server.SQLBuilder ;
import oracle.jbo.server.ViewObjectImpl ;
import oracle.jbo.server.ViewRowImpl ;
import oracle.jbo.server.ViewRowSetImpl ;
import oracle.jdbc.OracleCallableStatement ;
import oracle.jdbc.OracleConnection ;
import oracle.jdbc.OracleTypes ;
public class Profiles1ViewImpl extends ViewObjectImpl {
private static final String SQL_STM = "begin Pkg_profile.get_profile_list(?,?,?,?);end;" ;
public Profiles1ViewImpl () {
/* 0. */
protected void create () {
getViewDef ().setQuery ( null ) ;
getViewDef ().setSelectClause ( null ) ;
setQuery ( null ) ;
public Connection getCurrentConnection () throws SQLException {
// Note that we never execute this statement, so no commit really happens
Connection conn = null ;
PreparedStatement st = getDBTransaction ().createPreparedStatement ( "commit" , 1 ) ;
conn = st.getConnection () ;
st.close () ;
return conn ;
/* 1. */
protected void executeQueryForCollection ( Object qc , Object[] params , int numUserParams ) {
storeNewResultSet ( qc , retrieveRefCursor ( qc , params ) ) ;
// callStoredProcedure ( qc , SQL_STM ) ;
super.executeQueryForCollection ( qc , params , numUserParams ) ;
/* 2. */
private ResultSet retrieveRefCursor ( Object qc , Object[] params ) {
ResultSet rs = null ;
rs = callStoredProcedure ( qc , SQL_STM ) ;
return rs ;
/* 3. */
public ResultSet callStoredProcedure ( Object qc , String stmt ) {
CallableStatement st = null ;
ResultSet refCurResultSet = null ;
try {
st = getDBTransaction ().createCallableStatement ( stmt , 0 ) ; // call
st.setObject ( 1 , 571 ) ; //set id of my record to 571
st.registerOutParameter ( 2 , OracleTypes.CURSOR ) ; // my ref_cursor
st.registerOutParameter ( 3 , Types.NUMERIC ) ;
st.registerOutParameter ( 4 , Types.VARCHAR ) ;
st.execute () ; //executeUpdate
System.out.println ( "Numeric " + st.getObject ( 3 ) ) ;
System.out.println ( "Varchar " + st.getObject ( 4 ) ) ;
refCurResultSet = ( ResultSet ) st.getObject ( 2 ) ; //set Cursoru to ResultSet
// setUserDataForCollection(qc, refCurResultSet); //don't work
// createRowFromResultSet ( qc , refCurResultSet ) ; //don't work
/* this works but only one-time call - so my resultSet(cursor) really have a data
while ( refCurResultSet.next () ) {
String nameProfile = refCurResultSet.getString ( 2 ) ;
System.out.println ( "Name profile: " + nameProfile ) ;
return refCurResultSet ;
} catch ( SQLException e ) {
System.out.println ( "sql ex " + e ) ;
throw new JboException ( e ) ;
} finally {
if ( st != null ) {
try {
st.close () ; // 7. Close the statement
} catch ( SQLException e ) {
System.out.println ( "sql exx2 " + e ) ;
/* 4. Store a new result set in the query-collection-private user-data context */
private void storeNewResultSet ( Object qc , ResultSet rs ) {
ResultSet existingRs = getResultSet ( qc ) ;
// If this query collection is getting reused, close out any previous rowset
if ( existingRs != null ) {
try {
existingRs.close () ;
} catch ( SQLException s ) {
System.out.println ( "sql err " + s ) ;
setUserDataForCollection ( qc , rs ) ; //should store my result set
hasNextForCollection ( qc ) ; // Prime the pump with the first row.
/* 5. Retrieve the result set wrapper from the query-collection user-data */
private ResultSet getResultSet ( Object qc ) {
return ( ResultSet ) getUserDataForCollection ( qc ) ;
// createRowFromResultSet - overridden for custom java data source support - also doesn't work
protected ViewRowImpl createRowFromResultSet ( Object qc , ResultSet resultSet ) {
ViewRowImpl value = super.createRowFromResultSet ( qc , resultSet ) ;
return value ;
}Hi I have the same problem like you ...
My SQL Definition:
CREATE OR REPLACE TYPE RMSPRD.NB_TAB_STOREDATA is table of NB_STOREDATA_REC
CREATE OR REPLACE TYPE RMSPRD.NB_STOREDATA_REC AS OBJECT (
v_title VARCHAR2(100),
v_store VARCHAR2(50),
v_sales NUMBER(20,4),
v_cost NUMBER(20,4),
v_units NUMBER(12,4),
v_margin NUMBER(6,2),
v_ly_sales NUMBER(20,4),
v_ly_cost NUMBER(20,4),
v_ly_units NUMBER(12,4),
v_ly_margin NUMBER(6,2),
v_sales_variance NUMBER(6,2)
CREATE OR REPLACE PACKAGE RMSPRD.NB_SALES_DATA
AS
v_sales_format_tab nb_tab_storedata;
FUNCTION sales_data_by_format_gen (
key_value IN VARCHAR2,
l_to_date IN DATE DEFAULT SYSDATE-1,
l_from_date IN DATE DEFAULT TRUNC (SYSDATE, 'YYYY')
RETURN nb_tab_storedata;
I have a PLSQL function .. that will return table ..
when i use this in sql developer it is working fine....
select * from table (NB_SALES_DATA.sales_data_by_format_gen('TSC',
'05-Aug-2012',
'01-Aug-2012') )
it returning table format record.
I am not able to call from VO object. ...
Hope you can help me .. please tell me step by step process...
protected Object callStoredFunction(int sqlReturnType, String stmt,
Object[] bindVars) {
System.out.println("--> 1");
CallableStatement st = null;
try {
st = getDBTransaction().createCallableStatement("begin ? := " +"NB_SALES_DATA.sales_data_by_format_gen('TSC','05-Aug-2012','01-Aug-2012') ; end;", 0);
System.out.println("--> 2");
st.executeUpdate();
System.out.println("--> 3");
return st.getObject(1);
catch (SQLException e) {
e.printStackTrace();
throw new JboException(e); -
Main Query modification result Report builder crash [Solved]
Hi,
I want to modify main Query of report builder because (it shows two columns which are not generated by query and when I run report it raises error that columns not found) but when I modify the query it result in report builder crash, plz give me any solution, I had experience same issue a month ago and I created new query with all formula columns but this time I have too much CF and CP columns is there any way to drop it from one group to another.
Thanks and Regards, Khawar.
Details:
OS windows XP/2000
Report Builder 10.1.2.0.2
ORACLE Server Release 10.1.0.4.2
Oracle Procedure Builder 10.1.2.0.2
Oracle ORACLE PL/SQL V10.1.0.4.2 - Production
Oracle CORE 10.1.0.4.0 Production
Oracle Tools Integration Services 10.1.2.0.2
Oracle Tools Common Area 10.1.2.0.2
Oracle Toolkit 2 for Windows 32-bit platforms 10.1.2.0.2
Resource Object Store 10.1.2.0.2
Oracle Help 10.1.2.0.2
Oracle Sqlmgr 10.1.2.0.2
Oracle Query Builder 10.1.2.0.2 - Production
PL/SQL Editor (c) WinMain Software (www.winmain.com), v1.0 (Production)
Oracle ZRC 10.1.2.0.2
Oracle XML Developers Kit 10.1.0.4.2 - Production
Oracle Virtual Graphics System 10.1.2.0.2
Oracle Image 10.1.2.0.2
Oracle Multimedia Widget 10.1.2.0.2
Oracle Tools GUI Utilities 10.1.2.0.2
Message was edited by:
S. KhawarHi,
I saved the report in JSP format and did the required change and it works great.
Regards, Khawar. -
Query Show deptno 20 Last record to End
Oracle 9i Database
I want to create a query that show records, Deptno 20 last record to End.
blow query show all records that are in emp table.
SQL> select empno,ename,job,deptno, row_number() over (order by deptno) rno from emp;
EMPNO ENAME JOB DEPTNO RNO
7782 CLARK MANAGER 10 1
7839 KING PRESIDENT 10 2
7934 MILLER CLERK 10 3
7369 SMITH CLERK 20 4
7876 ADAMS CLERK 20 5
7902 FORD ANALYST 20 6
7788 SCOTT ANALYST 20 7
7566 JONES MANAGER 20 8
7499 ALLEN SALESMAN 30 9
7698 BLAKE MANAGER 30 10
7654 MARTIN SALESMAN 30 11
EMPNO ENAME JOB DEPTNO RNO
7900 JAMES CLERK 30 12
7844 TURNER SALESMAN 30 13
7521 WARD SALESMAN 30 14
14 rows selected.
SQL> I want result
EMPNO ENAME JOB DEPTNO RNO
7566 JONES MANAGER 20 8
7499 ALLEN SALESMAN 30 9
7698 BLAKE MANAGER 30 10
7654 MARTIN SALESMAN 30 11
7900 JAMES CLERK 30 12
7844 TURNER SALESMAN 30 13
7521 WARD SALESMAN 30 14Regardswith t as
( select 7782 e1,'CKING ' e2 , ' PRESIDENT ' e3 , 10 e4 from dual union all
select 7934, 'MILLER' , 'CLERK ' , 10 from dual union all
select 7369, 'SMITH ' , 'CLERK ' , 20 from dual union all
select 7876, 'ADAMS' , 'CLERK ' , 20 from dual union all
select 7902, 'FORD ' , 'ANALYST ' , 20 from dual union all
select 7788, 'SCOTT' , 'ANALYST ' , 20 from dual union all
select 7788 ,' SCOTT ' ,'ANALYST ' , 20 from dual union all
select 7566, 'JONES ', 'MANAGER ' , 20 from dual union all
select 7499, 'ALLEN ' , 'SALESMAN' , 30 from dual union all
select 7698, 'BLAKE ' , 'MANAGER ' , 30 from dual union all
select 7654, 'MARTIN' , 'SALESMAN ' , 30 from dual union all
select 7900, 'JAMES ' , 'CLERK ' , 30 from dual union all
select 7844, 'TURNER' , 'SALESMAN ' , 30 from dual union all
select 7521 ,'WARD ' , 'SALESMAN ' , 30 from dual
SELECT o.*
FROM (SELECT p.*,
MAX (CASE
WHEN p.e4 = 20
THEN p.rno
END) OVER (ORDER BY p.e4) AS mx
FROM (SELECT a.*, ROW_NUMBER () OVER (ORDER BY e4) rno
FROM t a) p) o
WHERE o.rno >= o.mx -
How to shows result as Alias name.
Dear All,
I am having following query and output, in that inside query showing one record check another query, that result i want to show as Alias, Can we show result as alias ?
select SPL.speciality_description,Emp.FIRSTNAME,DT.full_date
,max(decode(diagnosis_description,
(SELECT DIAGNOSIS_DESCRIPTION
FROM (SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,
DG.DIAGNOSIS_DESCRIPTION
FROM A_PERFORMANCEDOCTORWISE PD
INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID
INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID
WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)
and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6
) WHERE r=1),patientcount)) as First
,max(decode(diagnosis_description,
(SELECT DIAGNOSIS_DESCRIPTION FROM (
SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,
DG.DIAGNOSIS_DESCRIPTION
FROM A_PERFORMANCEDOCTORWISE PD
INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID
INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID
WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)
and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6
) WHERE r=2),patientcount)) as Second
,max(decode(diagnosis_description,
(SELECT DIAGNOSIS_DESCRIPTION FROM (
SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,
DG.DIAGNOSIS_DESCRIPTION
FROM A_PERFORMANCEDOCTORWISE PD
INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID
INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID
WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)
and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6
) WHERE r=3),patientcount)) as Third
,max(decode(diagnosis_description,
(SELECT DIAGNOSIS_DESCRIPTION FROM (
SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,
DG.DIAGNOSIS_DESCRIPTION
FROM A_PERFORMANCEDOCTORWISE PD
INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID
INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID
WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)
and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6
) WHERE r=4),patientcount)) as Forth
,max(decode(diagnosis_description,
(SELECT DIAGNOSIS_DESCRIPTION FROM (
SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,
DG.DIAGNOSIS_DESCRIPTION
FROM A_PERFORMANCEDOCTORWISE PD
INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID
INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID
WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)
and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6
) WHERE r=5),patientcount)) as Fifth
FROM A_PERFORMANCEDOCTORWISE PD
INNER JOIN D_SPECIALITY SPL ON SPL.SPECIALITYID = PD.SPECIALITYID
INNER JOIN D_EMPLOYEEMASTER EMP ON EMP.EMPID = PD.DOCTORID
INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID
INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID
WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)
and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual)
group by SPL.speciality_description, Emp.FIRSTNAME, DT.full_date
order by SPL.speciality_description,Emp.FIRSTNAME,DT.full_date
Output:
REGISTRATION Dr.POOJA 19-JUL-10 12:00 AM 56 74 99 32 96
REGISTRATION Dr.POOJA 21-JUL-10 12:00 AM 93 74 45 43 69
REGISTRATION Dr.POOJA 22-JUL-10 12:00 AM 34 34 76 66 24
REGISTRATION Dr.POOJA 24-JUL-10 12:00 AM 99 75 97 78 69
REGISTRATION Dr.POOJA 26-JUL-10 12:00 AM 54 34 76 66 24
REGISTRATION Dr.POOJA 28-JUL-10 12:00 AM 76 75 97 78 33
REGISTRATION Dr.POOJA 30-JUL-10 12:00 AM 54 23 34 65 23
Travel Clinic Dr.PRAN 19-JUL-10 12:00 AM 56 74 99 32 96
Travel Clinic Dr.PRAN 21-JUL-10 12:00 AM 93 74 45 43 69
Anothe Query :
SELECT DIAGNOSIS_DESCRIPTION
FROM (SELECT row_number() OVER (ORDER BY DIAGNOSIS_DESCRIPTION DESC) r,
DG.DIAGNOSIS_DESCRIPTION
FROM A_PERFORMANCEDOCTORWISE PD
INNER JOIN D_DATE DT ON DT.DATE_ID = PD.DATEID
INNER JOIN D_DIAGNOSIS DG ON DG.DIAGNOSISID = PD.DIAGNOSISID
WHERE DT.FULL_DATE between (select TO_CHAR(sysdate-15,'DD/MON/YYYY') from dual)
and (select TO_CHAR(sysdate,'DD/MON/YYYY') from dual) and ROWNUM < 6
) WHERE r=1
Output:
Neurocytoma
I want to show this result as Alias name. Can anybody tell me how to do that ?
Thanks and Regard's
Harish PatilHi,
If I've understood the intention of your code correctly, you are trying to pivot the rows into columns and assign a "nice" header to the resulting columns.
You cannot dynamically assign a column name to a pivoted row. You need to know beforehand what row you are pivoting so you can assign a column name to it. This isn't as difficult as it sounds, there are a number of ways you could know what row will become what column.
Since I have no way to test using your code, I am posting an example for you that uses the EMP table that is part of the standard example databases shipped with Oracle.
Also, notice that, the code I am presenting is enclosed between the tags (which you cannot see) [ code ] and [ / code ] which is why it appears nicely formatted. Your code would be much easier to read and folks would be much more likely to understand what you want and therefore help you if you take the time to format your code so it is comprehensible.
See the basics of using tags to format your code at this page:
http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
Now the example that will help you get what you want:
/* this query calculates the total salaries per deptno */
SELECT job,
deptno,
sum(sal) sal
FROM emp
GROUP BY job, deptno;
/* output is */
JOB SUM(SAL)
CLERK 4150
SALESMAN 5600
PRESIDENT 5000
MANAGER 8275
ANALYST 6000
/* this query pivots the above query (which is what you're trying to do) */
SELECT *
FROM (
SELECT job,
deptno,
sum(sal) sal
FROM emp
GROUP BY job, deptno
PIVOT (sum(sal) FOR deptno IN (10, 20, 30, 40));
/* output is */
CLERK SALESMAN PRESIDENT MANAGER ANALYST
4150 5600 5000 8275 6000If you are not using 11g, there are ways of doing the above without using the PIVOT clause. There are lots of examples in this forum on how to pivot rows. Here is one that pretty much does manually what the PIVOT clause does:
select max(case when job='CLERK'
then ename else null end) as clerks,
max(case when job='ANALYST'
then ename else null end) as analysts,
max(case when job='MANAGER'
then ename else null end) as mgrs,
max(case when job='PRESIDENT'
then ename else null end) as prez,
max(case when job='SALESMAN'
then ename else null end) as sales
from (
select job,
ename,
row_number()over(partition by job order by ename) rn
from emp
) x
group by rn
/* outputs */
CLERKS ANALYSTS MGRS PREZ SALES
MILLER FORD CLARK KING TURNER
JAMES SCOTT BLAKE MARTIN
ADAMS JONES WARD
SMITH ALLENHTH,
John.
Edited by: 440bx - 11gR2 on Aug 2, 2010 9:28 AM - added missing verb "is" in sentence
Edited by: 440bx - 11gR2 on Aug 2, 2010 9:32 AM - missing "s" in select. -
A php search engine that only shows results that match entire serch string
I have set up a dreamweaver search engine through php and a fulltext search (WHERE MATCH (....) AGAINST (...). However, when someone inputs more than one word into the search form, the search engine churns out results that only have one of those words. How do I get it to only show results that have all the search string words inside? (or, at least, how do I get those results to show up at the top?)
I have seen some advice (here) that uses php code to process the search query, divide up the words, and place a BOOLEAN '+' between each of the words. By doing this, the search engine will only show results that fully match all the terms.
My problem is that I do not know how to put this code into my Dreamweaver-created code.
My dreamweaver created code:
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
return $theValue;
$form_rsSearch = "-1";
if (isset($_get['search'])) {
$form_rsSearch = $_get['search'];
mysql_select_db($database_dataConnect, $dataConnect);
$query_rsSearch = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH (title, content) AGAINST (%s)", GetSQLValueString($form_rsSearch, "text"));
$rsSearch = mysql_query($query_rsSearch, $dataConnect) or die(mysql_error());
$row_rsSearch = mysql_fetch_assoc($rsSearch);
$totalRows_rsSearch = mysql_num_rows($rsSearch);
$input_rsSearchResults = "-1";
if (isset($_GET['search'])) {
$input_rsSearchResults = $_GET['search'];
mysql_select_db($database_EMdataConnect, $dataConnect);
$query_rsSearchResults = sprintf("SELECT title, content FROM encyclopedia WHERE MATCH(title, content) AGAINST(%s)", GetSQLValueString($input_rsSearchResults, "text"));
$rsSearchResults = mysql_query($query_rsSearchResults, $dataConnect) or die(mysql_error());
$row_rsSearchResults = mysql_fetch_assoc($rsSearchResults);
?>
and the code the website (link above) gives is:
function search(String $search_string) {
//strip Boolean search characters out of search string
$search_string = string_replace($search_string,"+","");
$search_string = string_replace($search_string,"-","");
$search_string = string_replace($search_string,"*","");
//split the search string up into an array of words
Array $tokenized_search = split($search_string, " ");
//init an empty final search string
String $processed_search = "";
//for each word in the search, wrap it
//with an + and * character and then append
//it to the processed_search variable
foreach($tokenized_search as $token) {
$processed_search+="+"+$token+"* ";
//build the sql for the query and query the DB
String $db_query = "select id, description
from product_descriptions
where MATCH(description)
AGAINST ('"+$processed_search+"' IN BOOLEAN MODE)";
Array results = execute_database_query($db_query);
return results;
If anyone can instruct me on the correct way to go about this, I would be very much obliged.
Thank you,
YWSWDon't use the Search bar, type the address in the Location bar.
-
Hi!
I am unable to get the result for my one of the item as checkbox. Other two are working properly .Please check and let me know wheres the problem please.
***INCLUDE ZSD_CONTRACT_LIST_T01_RENTAL1 .
TABLES: vbak, vbap, wbrk, zsdsched,vbkd, fplt, fpla, tvlvt.
TYPE-POOLS: slis.
data: BEGIN OF gt_report occurs 0,
vbeln LIKE vbak-vbeln, "Sales Document
posnr LIKE vbap-posnr, "Item
ernam LIKE vbak-ernam, "Created by
erdat LIKE vbak-erdat, "Created on
audat LIKE vbak-audat, "Document Date
vbtyp LIKE vbak-vbtyp, "SD document category
auart LIKE vbak-auart, "Sales Document type
vkorg LIKE vbak-vkorg, "Sales Org
vtweg LIKE vbak-vtweg, "Distribution Channel
spart LIKE vbak-spart, "Division
vkbur LIKE vbak-vkbur, "Sales Office
guebg LIKE vbak-guebg, "Valid from date
gueen LIKE vbak-gueen, "Valid to date kunnrt LIKE kna1-name1, "Sold-to Name
kunwet LIKE kna1-name1, "Ship-to Name
kunnrt LIKE kna1-name1, "Sold-to Name
kunret LIKE kna1-name1, "Bill-to Name
kunnr LIKE vbak-kunnr, "Sold-to party
kunnrt LIKE kna1-name1, "Sold-to Name
kvgr4 LIKE vbak-kvgr4, "Territory
matnr LIKE vbap-matnr, "Material
arktx LIKE vbap-arktx, "Material Short Text
charg LIKE vbap-charg, "Batch
matkl LIKE vbap-matkl, "Material Group
pstyv LIKE vbap-pstyv, "Item Category
zmeng LIKE vbap-zmeng, "Target Quantity
zieme LIKE vbap-zieme, "Target Unit
kdmat LIKE vbap-kdmat, "Customer Material Number
werks LIKE vbap-werks, "Plant
lgort LIKE vbap-lgort, "Storage Location
vstel LIKE vbap-vstel, "Shipping Point
route LIKE vbap-route, "Route
netpr LIKE vbap-netpr, "Net Price
kpein LIKE vbap-kpein, "Condition Price Unit
kmein LIKE vbap-kmein, "Condition Unit
shkzg LIKE vbap-shkzg, "Returns Item
oidrc LIKE vbap-oidrc, "DRC Code
kunwe LIKE vbap-oid_ship, "Ship-to
aufnr LIKE vbap-aufnr, "Order Number
vkaus LIKE vbap-vkaus, "Usage
kunwet LIKE kna1-name1, "Ship-to Name
zzwprofid LIKE vbap-zzwprofid, "Waste Profile ID
kunre LIKE wbrk-kunre, "Bill-to
kunret LIKE kna1-name1, "Bill-to Name
addl_schd LIKE icon-id, "Push Button For addl line
datab LIKE zsdsched-datab, "Valid-From Date
datbi LIKE zsdsched-datbi, "Valid To Date
zschdfreq LIKE zsdsched-zschdfreq, "Contract schedule frequency
frequency LIKE zsdsched-frequency, "Frequency
monday LIKE zsdsched-monday, "Mondays
tuesday LIKE zsdsched-tuesday, "Tuesdays
wednesday LIKE zsdsched-wednesday, "Wednesdays
thursday LIKE zsdsched-thursday, "Thursdays
friday LIKE zsdsched-friday, "Fridays
saturday LIKE zsdsched-saturday, "Saturdays
sunday LIKE zsdsched-sunday, "Sundays
dzieme LIKE zsdsched-dzieme, "Target quantity UoM
comments LIKE zsdsched-comments, "Comments
END OF gt_report.
data: Begin of gt_report1 occurs 0,
fksaf LIKE fplt-fksaf,
afdat LIKE fplt-afdat,
fakwr LIKE fplt-fakwr,
fkdat LIKE fplt-fkdat,
nfdat LIKE fplt-nfdat,
fpart LIKE fpla-fpart,
bedat LIKE fpla-bedat,
endat LIKE fpla-endat,
horiz LIKE fpla-horiz,
bezei LIKE tvlvt-bezei,
vbeln LIKE vbak-vbeln,
erdat LIKE vbak-erdat,
ernam LIKE vbak-ernam,
guebg LIKE vbak-guebg,
gueen LIKE vbak-gueen,
auart LIKE vbak-auart,
kunnr LIKE vbak-kunnr,
kvgr4 LIKE vbak-kvgr4,
vkbur LIKE vbak-vkbur,
vkorg LIKE vbak-vkorg,
vtweg LIKE vbak-vtweg,
vbtyp LIKE vbak-vbtyp,
name1 LIKE kna1-name1,
pstyv LIKE vbap-pstyv,
matnr LIKE vbap-matnr,
werks LIKE vbap-werks,
oid_ship LIKE vbap-oid_ship,
kpein LIKE vbap-kpein,
kmein LIKE vbap-kmein,
netpr LIKE vbap-netpr,
kdmat LIKE vbap-kdmat,
posnr LIKE vbap-posnr,
matkl LIKE vbap-matkl,
aufnr LIKE vbap-aufnr,
vkaus LIKE vbap-vkaus,
route LIKE vbap-route,
kunre LIKE wbrk-kunre, "Bill-to
kunwe LIKE vbap-oid_ship, "Ship-to
kunwet LIKE kna1-name1, "Ship-to Name
kunnrt LIKE kna1-name1, "Sold-to Name
kunret LIKE kna1-name1, "Bill-to Name
End of gt_report1.
data: gs_report LIKE LINE OF gt_report,
gs_report1 LIKE LINE OF gt_report1,
gt_sched TYPE TABLE OF zsdsched,
gt_sched_tmp TYPE TABLE OF zsdsched,
gs_sched TYPE zsdsched,
gt_sel LIKE gt_report OCCURS 0,
gt_sel1 LIKE gt_report1 OCCURS 0,
gt_vbpa TYPE TABLE OF vbpa,
gs_vbpa TYPE vbpa,
gv_auart TYPE auart,
gv_counter TYPE i.
**-- ALV variables
DATA: ls_fieldcat TYPE slis_fieldcat_alv, "Field Catalog list
gt_fieldcat TYPE slis_t_fieldcat_alv, "Field Catalog
ls_sort TYPE slis_sortinfo_alv, "Sorting list
gt_sort TYPE slis_t_sortinfo_alv, "Sort
gs_layout TYPE slis_layout_alv, "List Layout
gs_variant TYPE disvariant, "Display Variant
gv_repid LIKE sy-repid,
gv_save(1) TYPE c,
ls_fieldcat1 TYPE slis_fieldcat_alv, "Field Catalog list
gt_fieldcat1 TYPE slis_t_fieldcat_alv, "Field Catalog
ls_sort1 TYPE slis_sortinfo_alv, "Sorting list
gt_sort1 TYPE slis_t_sortinfo_alv, "Sort
gs_layout1 TYPE slis_layout_alv, "List Layout
gs_variant1 TYPE disvariant, "Display Variant
gv_repid1 LIKE sy-repid,
gv_exit(1) TYPE c.
CONSTANTS: gc_a TYPE c VALUE 'A',
gc_g TYPE c VALUE 'G',
gc_re(2) TYPE c VALUE 'RE'.
Screen-control Variables
CONTROLS:
tctrl_sched TYPE TABLEVIEW USING SCREEN 1010. " Schedule lines.
*& Report ZSD_CONTRACT_LIST
*& Created on: January 21, 2007
*& Description: List of Contracts - ALV
REPORT zsd_contract_list_rental1.
INCLUDE zsd_contract_list_t01_rental1.
Selection Screen
SELECTION-SCREEN BEGIN OF BLOCK m1 WITH FRAME TITLE text-t01.
SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-t02.
SELECT-OPTIONS: s_vkorg FOR vbak-vkorg MEMORY ID vko,
s_vtweg FOR vbak-vtweg MEMORY ID vtw,
s_spart FOR vbak-spart MEMORY ID spa,
s_vkbur FOR vbak-vkbur MEMORY ID vkb.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS: s_vbeln FOR vbak-vbeln,
s_erdat FOR vbak-erdat,
s_ernam FOR vbak-ernam,
s_guebg FOR vbak-guebg,
s_gueen FOR vbak-gueen,
s_auart FOR gv_auart MEMORY ID vta
MATCHCODE OBJECT h_vakz,
s_fkarv FOR fplt-fkarv.
SELECTION-SCREEN SKIP 1.
SELECT-OPTIONS:
s_kunnr FOR vbak-kunnr,
s_kunwe FOR vbap-oid_ship,
s_kunre FOR wbrk-kunre.
SELECTION-SCREEN END OF BLOCK b1.
SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-t03.
SELECT-OPTIONS: s_werks FOR vbap-werks MEMORY ID wrk,
s_lgort FOR vbap-lgort MEMORY ID lag,
s_vstel FOR vbap-vstel MEMORY ID vst,
s_route for vbap-route,
s_matnr FOR vbap-matnr.
SELECTION-SCREEN END OF BLOCK b2.
SELECTION-SCREEN BEGIN OF BLOCK b3 WITH FRAME TITLE text-t04.
PARAMETERS: p_varia TYPE disvariant-variant MEMORY ID wrk,
p_all AS CHECKBOX DEFAULT 'X',
p_group AS CHECKBOX DEFAULT 'X',
p_rental AS CHECKBOX DEFAULT 'X'.
SELECTION-SCREEN END OF BLOCK b3.
SELECTION-SCREEN END OF BLOCK m1.
Start of Selection
START-OF-SELECTION.
PERFORM get_data.
Display ALV
END-OF-SELECTION.
IF gt_report[] IS INITIAL.
MESSAGE s419(brain).
ELSE.
PERFORM create_alv.
ENDIF.
AT SELECTION-SCREEN ON VALUE-REQUEST *
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varia.
PERFORM f01_f4_variant CHANGING p_varia.
*& Form get_data
text
FORM get_data .
select the appropriate rental data.
IF p_rental IS NOT INITIAL AND ( ( p_all IS INITIAL ) AND ( p_group IS INITIAL ) ).
SELECT avbeln aerdat aernam aaudat avbtyp aauart a~vkorg
avtweg aspart avkbur aguebg agueen akunnr a~kvgr4
bpstyv bmatnr bwerks boid_ship bkpein bkmein
bnetpr bkdmat bposnr bmatkl baufnr bvkaus b~route
dbezei efkarv eafdat efakwr efkdat enfdat e~fksaf
ffpart fbedat fendat fhoriz flodat ftndat b~oid_ship AS kunwe
INTO CORRESPONDING FIELDS OF TABLE gt_sel1
FROM vbak AS a
INNER JOIN vbap AS b ON avbeln = bvbeln
INNER JOIN vbpa as c ON avbeln = cvbeln
INNER JOIN vbkd AS g ON avbeln = gvbeln
INNER JOIN fplt AS e ON gfplnr = efplnr
INNER JOIN fpla AS f ON efplnr = ffplnr
INNER JOIN tvlvt AS d ON bvkaus = dabrvw
WHERE a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~vbtyp = gc_g
AND a~ernam IN s_ernam
AND a~vkorg IN s_vkorg
AND a~vtweg IN s_vtweg
AND a~spart IN s_spart
AND a~vkbur IN s_vkbur
AND a~guebg IN s_guebg
AND a~gueen IN s_gueen
AND a~auart IN s_auart
AND a~kunnr IN s_kunnr
AND b~oid_ship IN s_kunwe
AND b~werks IN s_werks
AND b~lgort IN s_lgort
AND b~vstel IN s_vstel
and b~route in s_route
AND b~matnr IN s_matnr
AND e~fkarv IN s_fkarv
AND e~fksaf = 'A'
OR e~fksaf = 'B'.
sort gt_sel1.
*ENDIF.
IF NOT gt_sel1[] IS INITIAL.
Get Bill-to Party's for Item Lines
SELECT vbeln posnr parvw kunnr INTO CORRESPONDING FIELDS OF TABLE gt_vbpa
FROM vbpa
FOR ALL ENTRIES IN gt_sel1
WHERE vbeln = gt_sel1-vbeln
AND parvw = gc_re.
Loop through captured data for additional information
LOOP AT gt_sel1 INTO gs_report1.
Find the bill-to party
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report1-vbeln
posnr = gs_report1-posnr
parvw = gc_re.
IF sy-subrc <> 0.
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report1-vbeln
parvw = gc_re.
CHECK sy-subrc = 0 AND gs_vbpa-kunnr IN s_kunre.
ELSE.
CHECK gs_vbpa-kunnr IN s_kunre.
ENDIF.
gs_report1-kunre = gs_vbpa-kunnr.
Get the Customer's Name
gs_report1-kunnrt = zcl_kna1=>get_name1( itp_kunnr = gs_report1-kunnr ).
gs_report1-kunwet = zcl_kna1=>get_name1( itp_kunnr = gs_report1-kunwe ).
gs_report1-kunret = zcl_kna1=>get_name1( itp_kunnr = gs_report1-kunre ).
Get the scheduling lines for the item line.
CLEAR gv_counter.
APPEND gs_report1 TO gt_report1.
ENDLOOP.
DELETE ADJACENT DUPLICATES FROM gt_report1.
*ENDIF.
ELSE.
IF ( ( p_all IS NOT INITIAL ) OR ( p_group IS NOT INITIAL ) ) AND p_rental IS INITIAL.
Select the appropriate contract data.
SELECT a~vbeln a~erdat a~ernam a~audat a~vbtyp a~auart a~vkorg
a~vtweg a~spart a~vkbur a~guebg a~gueen a~kunnr a~kvgr4
b~posnr b~matnr b~charg b~matkl b~arktx b~pstyv b~zmeng
b~zieme b~kdmat b~werks b~lgort b~vstel b~netpr b~kpein
b~kmein b~shkzg b~oid_extbol b~oid_miscdl b~oidrc b~oid_ship AS kunwe
b~zzwprofid c~datbi c~datab b~route
baufnr bvkaus d~bezei
INTO CORRESPONDING FIELDS OF TABLE gt_sel
FROM vbak AS a
INNER JOIN vbap AS b ON a~vbeln = b~vbeln
INNER JOIN tvlvt AS d ON bvkaus = dabrvw
LEFT OUTER JOIN zsdsched AS c ON b~vbeln = c~vbeln AND
b~posnr = c~posnr
WHERE a~vbeln IN s_vbeln
AND a~erdat IN s_erdat
AND a~vbtyp = gc_g
AND a~ernam IN s_ernam
AND a~vkorg IN s_vkorg
AND a~vtweg IN s_vtweg
AND a~spart IN s_spart
AND a~vkbur IN s_vkbur
AND a~guebg IN s_guebg
AND a~gueen IN s_gueen
AND a~auart IN s_auart
AND a~kunnr IN s_kunnr
AND b~oid_ship IN s_kunwe
AND b~werks IN s_werks
AND b~lgort IN s_lgort
AND b~vstel IN s_vstel
and b~route in s_route
AND b~matnr IN s_matnr.
SORT gt_sel.
ENDIF.
IF NOT gt_sel[] IS INITIAL.
Get Bill-to Party's for Item Lines
SELECT vbeln posnr parvw kunnr INTO CORRESPONDING FIELDS OF TABLE gt_vbpa
FROM vbpa
FOR ALL ENTRIES IN gt_sel
WHERE vbeln = gt_sel-vbeln
AND parvw = gc_re.
endif.
Select the remaining records from the ZSDSCHED Table.
IF p_group IS NOT INITIAL.
SELECT * FROM zsdsched
INTO TABLE gt_sched
FOR ALL ENTRIES IN gt_sel
WHERE vbeln = gt_sel-vbeln
AND posnr = gt_sel-posnr.
SORT gt_sched.
ENDIF.
Loop through captured data for additional information
LOOP AT gt_sel INTO gs_report.
Find the bill-to party
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report-vbeln
posnr = gs_report-posnr
parvw = gc_re.
IF sy-subrc <> 0.
READ TABLE gt_vbpa INTO gs_vbpa WITH KEY vbeln = gs_report-vbeln
parvw = gc_re.
CHECK sy-subrc = 0 AND gs_vbpa-kunnr IN s_kunre.
ELSE.
CHECK gs_vbpa-kunnr IN s_kunre.
ENDIF.
gs_report-kunre = gs_vbpa-kunnr.
Get the Customer's Name
gs_report-kunnrt = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunnr ).
gs_report-kunwet = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunwe ).
gs_report-kunret = zcl_kna1=>get_name1( itp_kunnr = gs_report-kunre ).
Get the scheduling lines for the item line.
CLEAR gv_counter.
IF NOT p_group IS INITIAL.
If we are grouping the lines add the icon button.
LOOP AT gt_sched INTO gs_sched WHERE vbeln = gs_report-vbeln
AND posnr = gs_report-posnr.
IF gv_counter > 0.
gs_report-addl_schd = '@1E@'.
CONTINUE.
ENDIF.
MOVE-CORRESPONDING gs_sched TO gs_report.
ADD 1 TO gv_counter.
ENDLOOP.
ELSE.
Otherwise get the rest of the schedule information
READ TABLE gt_sched INTO gs_sched
WITH KEY vbeln = gs_report-vbeln
posnr = gs_report-posnr
datbi = gs_report-datbi
datab = gs_report-datab.
IF sy-subrc = 0.
MOVE-CORRESPONDING gs_sched TO gs_report.
ENDIF.
ENDIF.
APPEND gs_report TO gt_report.
ENDLOOP.
Remove any duplicates from the reporting table
DELETE ADJACENT DUPLICATES FROM gt_report.
If Show all records is initial, delete non-scheduled lines (ex. Sub-items)
IF p_all IS INITIAL.
DELETE gt_report WHERE datbi = 0
AND datab = 0.
ENDIF.
endif.
endif.
ENDFORM. " get_data
*& Form create_alv
text
FORM create_alv .
if ( ( p_all is not initial ) or ( p_group is not initial ) ) and p_rental is initial.
PERFORM initialize_fieldcat USING gt_fieldcat[].
PERFORM populate_layout CHANGING gs_layout
gs_variant.
PERFORM populate_sort USING gt_sort[].
PERFORM display_alv_report.
else.
if p_rental is not initial and ( ( p_all is initial ) and ( p_group is initial ) ).
PERFORM initialize_fieldcat1 USING gt_fieldcat1[].
PERFORM populate_layout1 CHANGING gs_layout1
gs_variant1.
PERFORM populate_sort1 USING gt_sort1[].
PERFORM display_alv_report1.
*endif.
*endif.
ENDFORM. " create_alv
*& Form initialize_fieldcat
Get and enhance the field catalog data
-->L_FIELDCAT[] text
FORM initialize_fieldcat USING l_fieldcat TYPE slis_t_fieldcat_alv.
IF p_rental IS NOT INITIAL .
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_RENTAL1'
i_internal_tabname = 'GT_REPORT1'
i_inclname = 'ZSD_CONTRACT_LIST_T01_RENTAL1'
CHANGING
ct_fieldcat = l_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'VBELN'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Contract'.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNNRT'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sold-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNWET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Ship-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNRET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Bill-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'ADDL_SCHD'.
IF NOT p_group IS INITIAL.
ls_fieldcat-seltext_s = 'Schd'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Additional Scheduling Lines'.
ls_fieldcat-icon = 'X'.
CLEAR: ls_fieldcat-key,
ls_fieldcat-ref_fieldname,
ls_fieldcat-ref_tabname,
ls_fieldcat-reptext_ddic,
ls_fieldcat-ddic_outputlen.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ELSE.
DELETE l_fieldcat INDEX sy-tabix.
ENDIF.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'DATAB'.
ls_fieldcat-seltext_s = 'Schd From'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. From Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat1 WITH KEY fieldname = 'DATBI'.
ls_fieldcat-seltext_s = 'Schd To'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. To Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ELSE.
IF p_rental IS INITIAL.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_RENTAL1'
i_internal_tabname = 'GT_REPORT'
i_inclname = 'ZSD_CONTRACT_LIST_T01_RENTAL1'
CHANGING
ct_fieldcat = l_fieldcat
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'VBELN'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Contract'.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNNRT'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sold-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNWET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Ship-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'KUNRET'.
ls_fieldcat-seltext_s =
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Bill-to Name'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'ADDL_SCHD'.
IF NOT p_group IS INITIAL.
ls_fieldcat-seltext_s = 'Schd'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Additional Scheduling Lines'.
ls_fieldcat-icon = 'X'.
CLEAR: ls_fieldcat-key,
ls_fieldcat-ref_fieldname,
ls_fieldcat-ref_tabname,
ls_fieldcat-reptext_ddic,
ls_fieldcat-ddic_outputlen.
ls_fieldcat-hotspot = 'X'.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ELSE.
DELETE l_fieldcat INDEX sy-tabix.
ENDIF.
READ TABLE l_fieldcat INTO ls_fieldcat WITH KEY fieldname = 'DATAB'.
ls_fieldcat-seltext_s = 'Schd From'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. From Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
READ TABLE l_fieldcat INTO ls_fieldcat1 WITH KEY fieldname = 'DATBI'.
ls_fieldcat-seltext_s = 'Schd To'.
ls_fieldcat-seltext_m = ls_fieldcat-seltext_l = 'Sched. To Date'.
CLEAR: ls_fieldcat-key.
MODIFY l_fieldcat FROM ls_fieldcat INDEX sy-tabix.
ENDIF.
ENDIF.
ENDFORM. " initialize_fieldcat
*& Form populate_layout
text
<--GS_LAYOUT
<--GS_VARIANT
FORM populate_layout CHANGING gs_layout TYPE slis_layout_alv
gs_variant TYPE disvariant.
gs_layout-colwidth_optimize = 'X'.
gs_layout-allow_switch_to_list = 'X'.
gs_layout-zebra = 'X'.
gs_variant-report = sy-repid.
ENDFORM. " populate_layout
*& Form populate_sort
text
-->l_SORT[] text
FORM populate_sort USING l_sort TYPE slis_t_sortinfo_alv.
ENDFORM. " populate_sort
*& Form display_alv_report
FORM display_alv_report .
gv_repid = sy-repid.
IF p_rental IS INITIAL.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'GT_REPORT'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = gc_a
is_variant = gs_variant
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_report
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDIF.
ELSE.
IF p_rental IS NOT INITIAL.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'GT_REPORT1'
is_layout = gs_layout
it_fieldcat = gt_fieldcat
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = gc_a
is_variant = gs_variant
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = GT_REPORT1
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
endif.
endif.
ENDFORM. " display_alv_report
*& Form initialize_fieldcat1
Get and enhance the field catalog data for rental fields
-->L_FIELDCAT[] text
*FORM initialize_fieldcat1 USING l_fieldcat1 TYPE slis_t_fieldcat_alv.
**if ***
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_rental1'
i_internal_tabname = 'GT_SEL1'
i_inclname = 'ZSD_CONTRACT_LIST_T01_rental1'
CHANGING
ct_fieldcat = l_fieldcat1
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
**else.
CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
EXPORTING
i_program_name = 'ZSD_CONTRACT_LIST_rental1'
i_internal_tabname = 'GT_SEL1'
i_inclname = 'ZSD_CONTRACT_LIST_T01_rental1'
CHANGING
ct_fieldcat = l_fieldcat1
EXCEPTIONS
inconsistent_interface = 1
program_error = 2
OTHERS = 3.
***endfi.
*ENDFORM. " initialize_fieldcat
*& Form populate_layout
text
<--GS_LAYOUT
<--GS_VARIANT
*FORM populate_layout1 CHANGING gs_layout1 TYPE slis_layout_alv
gs_variant1 TYPE disvariant.
gs_layout1-colwidth_optimize = 'X'.
gs_layout1-allow_switch_to_list = 'X'.
gs_layout1-zebra = 'X'.
gs_variant1-report = sy-repid.
*ENDFORM. " populate_layout
***& Form populate_sort
text
-->l_SORT[] text
*FORM populate_sort1 USING l_sort TYPE slis_t_sortinfo_alv.
*ENDFORM. " populate_sort
***& Form display_alv_report
*FORM display_alv_report1 .
gv_repid = sy-repid.
if p_rental is not initial and ( ( p_all is initial ) and ( p_group is initial ) ).
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
EXPORTING
I_INTERFACE_CHECK = ' '
I_BYPASSING_BUFFER =
I_BUFFER_ACTIVE = ' '
i_callback_program = gv_repid
I_CALLBACK_PF_STATUS_SET = ' '
i_callback_user_command = 'USER_COMMAND'
i_structure_name = 'gt_sel1'
is_layout = gs_layout1
it_fieldcat = gt_fieldcat1
IT_EXCLUDING =
IT_SPECIAL_GROUPS =
it_sort = gt_sort1
IT_FILTER =
IS_SEL_HIDE =
i_default = 'X'
i_save = gc_a
is_variant = gs_variant1
IT_EVENTS =
IT_EVENT_EXIT =
IS_PRINT =
IS_REPREP_ID =
I_SCREEN_START_COLUMN = 0
I_SCREEN_START_LINE = 0
I_SCREEN_END_COLUMN = 0
I_SCREEN_END_LINE = 0
IMPORTING
E_EXIT_CAUSED_BY_CALLER =
ES_EXIT_CAUSED_BY_USER =
TABLES
t_outtab = gt_sel1
EXCEPTIONS
program_error = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*endif.
*ENDFORM. " display_alv_report
*& Form f01_f4_variant
Get the Layout variant for the user.
FORM f01_f4_variant CHANGING c_variant TYPE disvariant-variant.
DATA: ls_variant TYPE disvariant,
l_exit TYPE char1.
ls_variant-report = sy-repid.
CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
EXPORTING
is_variant = ls_variant
i_save = 'A'
it_default_fieldcat =
IMPORTING
e_exit = l_exit
es_variant = ls_variant
EXCEPTIONS
not_found = 2.
IF sy-subrc = 2.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
IF l_exit EQ space.
c_variant = ls_variant-variant.
ENDIF.
ENDIF.
ENDFORM. " f01_f4_variant
FORM USER_COMMAND *
--> R_UCOMM *
--> RS_SELFIELD *
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
Check function code
CASE r_ucomm.
WHEN '&IC1'.
READ TABLE gt_report INTO gs_report INDEX rs_selfield-tabindex.
CHECK sy-subrc = 0.
CASE rs_selfield-fieldname.
WHEN 'VBELN'.
Set parameter ID for transaction screen field
CHECK NOT gs_report-vbeln IS INITIAL.
SET PARAMETER ID 'KTN' FIELD gs_report-vbeln.
CALL TRANSACTION 'VA43' AND SKIP FIRST SCREEN.
WHEN 'ADDL_SCHD'.
CHECK NOT gs_report-addl_schd IS INITIAL.
REFRESH gt_sched_tmp.
LOOP AT gt_sched INTO gs_sched
WHERE vbeln = gs_report-vbeln
AND posnr = gs_report-posnr.
APPEND gs_sched TO gt_sched_tmp.
ENDLOOP.
CHECK sy-subrc = 0.
CALL SCREEN '1010' STARTING AT 5 5.
ENDCASE.
ENDCASE.
ENDFORM. "user_command
*& Module STATUS_1010 OUTPUT
text
MODULE status_1010 OUTPUT.
SET PF-STATUS 'MAIN_1010'.
SET TITLEBAR '1010' WITH gs_report-vbeln gs_report-posnr.
ENDMODULE. " STATUS_1010 OUTPUT
*& Module USER_COMMAND_1010 INPUT
text
MODULE user_command_1010 INPUT.
CASE sy-ucomm.
WHEN 'BACK' OR 'CANC'.
LEAVE TO SCREEN 0.
ENDCASE.
ENDMODULE. " USER_COMMAND_1010 INPUTHi !
This report shows the schedule line items , group schedule line items and rental contact (billing plan) lines when particular checkbox is checked. The checkboxs p_all(non-schedule line) , p_group(group schedule line items) are working in my above alv report and showing result but unfortunately when p_rental is checked it dosent give me result , it says no data selected. This when checked has to show result based on a different set of selections as I have done, but its not shwoing me the result .
Kindly help please.
Thanks -
Custom field not getting populated in the "Show Results where" drop down
Hi all,
In appointment detail page by clicking on Add button on the user related information section , it takes us to a search layout showing the list of available users.
Here we have to filter the user's based on a custom field which has already been created in the user object. But I am not able to add the custom field in the "Show results where" drop down for which the search has to be done.
It is getting reflected in the normal search layouts.So Can any one tell me why the change is not getting reflected in the user related info search layout?I tested your use case and you are correct. I would recommend that you submit a service request to CRM On Demand customer care in reference to this issue.
-
How to show result from process in popup page?
<br>We want to use one popup page for many information in application. So we want to make the following thing.
<br>We want to execute process and show result in popup page (through hidden parameter-"P2_MESSAGE").
<br>We also assign title of region on that popup page through "P2_TITLE".
<br>What I do not know is how to show popup after process-branch problem.
<br>Process is executed from one button. Button is located on page "28" and popup page is "2"
<br>Code for javascript should be like:
<br>
javascript:popupURL('f?p=&APP_ID.:2:&APP_SESSION.::::P2_TITLE,P2_MESSAGE:'+'status '+','+'&P28_X.')<br>THXI have found in one thread:
<br>
<br>1) create an application item APP_ONLOAD (of course you can choose your own name)
<br>2) create an application level before footer computation on APP_ONLOAD to clear the item after the page is generated.
<br>3) place &APP_ONLOAD. (dot also) in the on load property of the page.
<br>4) fill the APP_ONLOAD using :APP_ONLOAD := 'onload="your own javascript to call a popup window;"' in the plsql of an after On Submit - After Computations and Validations process (type PL/SQL anonymous block)
Fill the when button pressed property of the process with the button you want to use to show the popup.
<br>5) create a branch to branch to the current page (or a other if you wish)
<br>
Looks OK but when I create in PL/SQL js with "&" signe, which I use for filling some hidden values in popup page I get error.
begin
is_test_ok (1, :P28_X);
:APP_ONLOAD := 'onload="javascript:popupHeightURL(''f?p=&APP_ID.:2:&APP_SESSION.::::P2_TITLE,P2_MESSAGE:''+''statusu testova''+'','+''&P28_X.'')"';
end;<br>Should I use ASCII codes for that or what? Any example please!
<br>THX -
Not showing results in simulation
hiii,
i made some chngs in (generate work schedule manually) in development server and transported to production server.
it is transported as i can view the changes but not showing result in simulation run, wats the reason...
ThanksNational Holiday is a simple Off and Paid Day.
So, hw u want the system to consider tht holdiay in payroll ?
might be u have to check in Time Evaluation for considering National Holdiay and wrkin any any spl. .payments towards it.
theere may not be any change of effect due to Holiday in Payroll until and unless the Absence Records if existing on dates of Holiday... then u mite have to delete the Absence Records and Update it again.
Or there is a report that need to be generated to remove the inconsistency... which currently dont have idea... will check n let u knw... in the mean while u can follow deleting the record and update Absence on Holiday again.
Regards
...Sadhu -
Query with results always needed...
Hi
Would you please help me to get this query? I noew with Oracle 9i...
What I need is to create a query Not empty or with rows always.
I have a list below where I need to get the count and the sum grouped by Source in a Date range.
- The fact is that if I change my date range (suppouse aprl/01/04 thru apr/30/04) the query will result with No rows, ok.
I need to create a row for every group (SAP, CAC), with Zeroes on the Count and on the Sum...
- If any group (SAP/CAC) have rows but the other one not also need to create a Zeroes row for the group that does not fall in the date range, suppose 03/03/2004...
Source Payment Code_Emp In_Date
SAP 100.00 001 01/01/2004
SAP 100.00 001 01/01/2004
SAP 100.00 001 02/02/2004
SAP 100.00 001 02/02/2004
SAP 100.00 001 03/03/2004
CAC 100.00 001 01/01/2004
CAC 100.00 001 01/01/2004
CAC 100.00 001 01/01/2004
CAC 100.00 001 01/01/2004
CAC 100.00 001 02/01/2004
CAC 100.00 001 02/01/2004
Total for date range from 01/01/2004 to 01/31/2004
Sum of Count
Payments
Totals for SAP 200.00 2
Totals for CAC 400.00 4
Difference 200.00 -2
I GOT SOMETHING LIKE THIS, BUT THIS WILL RETURN ME MORE THAN 2 ROWS, ONE FOR SAP OTHER FOR CACE AND OTHERS WITH NULLS....
SELECT Source,
NVL(Count(code_Emp),0) T_Payment_Req,
NVL(ROUND(Sum(payment),2),0.00) T_Payment_Amount
FROM ApDetail
WHERE Reconciliation_Id is Null
AND In_Date BETWEEN To_Date('01/01/2004','MM/DD/YYYY')
and To_Date('01/31/2004','MM/DD/YYYY')
GROUP by Source
union
SELECT Source, 0, 0
FROM ApDetail
WHERE Reconciliation_Id is Null
KIND REGARDS.SELECT
Count(SAP.code_Emp) SAP_T_Payment_Req,
Count(CAC.code_Emp) CAC_T_Payment_Req,
ROUND(NVL(Sum(SAP.payment),0),2) SAP_T_Payment_Amount,
ROUND(NVL(Sum(CAC.payment),0),2) CAC_T_Payment_Amount,
ROUND(NVL(Sum(CAC.payment),0),2) -
ROUND(NVL(Sum(SAP.payment),0),2) Difference
FROM ApDetail CAC, ApDetail SAP
WHERE
(SAP.Reconciliation_Id is Null
AND SAP.In_Date BETWEEN To_Date('01/01/2004','MM/DD/YYYY')
and To_Date('01/31/2004','MM/DD/YYYY')
AND SAP.SOURCE = 'SAP')
AND (CAC.Reconciliation_Id is Null
AND CAC.In_Date BETWEEN To_Date('01/01/2004','MM/DD/YYYY')
and To_Date('01/31/2004','MM/DD/YYYY')
AND CAC.SOURCE = 'CAC')
This Query ALWAYS return ONE record. -
Query Builder results seem to max out at 500 lines. How to change?
Hi all,
Some of out Application Express users are using the Query Builder tool for ad-hoc reporting. The idea is to run the SQL to extract the data, then download to MS Excel. The Query Builder results seem to max out at 500 lines. I want to increase that value. I searched all Application Express forums for 'query builder output max 500' and then 'query builder output' and did not find the answer.
How do I change the 500 line limit in Query Builder results?
Thanks!
Application Express 3.1.2.00.02
Oracle 10g
Standard PDF printing (not BI Publisher)Bryan,
Here is a link to an HTML-DB studio application, that is a QBE "replacement" for the query tool in APEX development..
http://htmldb.oracle.com/pls/otn/f?p=18326:7:1387557504245687::::P7_ID:1222
It is for an older version of APEX, but you should be able to make it work for your needs..
Thank you,
Tony Miller
Webster, TX
Maybe you are looking for
-
How can i send an ibook to a friend?
How can I send an iBook to a friend?
-
Need some help styling datagrid...
Hi, I have added a datagrid to my flex application and I need to give it a specific style but I can't get it to work. I need to remove the rollover color of the datagrid column headers. I've trawled through the flex forumns and website but so far I'v
-
IStat Pro, SMC fan control and tempuratures
I've been watching the recent temp. problem threads with great interest. My Imac has had no operational flaws *knock wood* but I'm a bit concerned with the temps which iStat Pro is reporting. For instance; CPU A 103 F. CPU diode 133 F. Ambient 79 F.
-
How to invoke a standard task in customized program?
Hi experts, I need to invoke a standard task in my program, does any1 know any FMs for invoking a task? Thx in advance, points will be rewarded. Vincent
-
Hi, Would like to know if unity connection : when press message button on the phone should be announcement "enter your password follow by #" but it does not, it prompted instead "welcome to unity message service..." . Would like to know why is that s