Error in Result Query - Using %
Hi All,
I have this problem:
I'm using %A (Percentage Share) to calculate the percentage between two values. For example:
99 %A 51 = -48,48% (This result is OK)
But,
-1005 %A -1018 = -1,29% (This result is NOK, the correct is 1,29).
The same problem occurs when I'm use % (Percentage Variance).
The results are calculated correctly but the signal is inverted.
Can you help me?
Regards,
Alex
Brazil
Let your definition be as it is.Check my logic below.
Column A
Here you are getting result as follows now:(considering two examples)
case1: 10
Case 2: -1.29
Now in the new formula you can do this
Column A * -1 . Let this be column B.
Hide this column. and Columns A too.
Now in a new formula:Column C
If Column A is less than ColumnB then Column B else Column A. This will give yo all the results as you expected.
You can extend my logic to manage negative values further.....
Similar Messages
-
Error while accessing Query using Query Analyzer
dear experts...
while accesiing the query using query analayzer...
we are getting below error...
What has happened?
URL http://xxx.xxx.xxx.xx:XXXX/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex call was terminated because the corresponding service is not available.
Note
The termination occurred in system BI1 with error code 404 and for the reason Not found.
The selected virtual host was 0 .
What can I do?
Please select a valid URL.
If you do not yet have a user ID, contact your system administrator.
ErrorCode:ICF-NF-http-c:001-u:ANAND-l:E-i:PSRCCPRDA003_BI1_00-v:0-s:404-r:Notfound
HTTP 404 - Not found
Your SAP Internet Communication Framework Team
thanks for helping me...
anandHi friends,,
instead of getting the link like
http://128.222.125.57:9000/sap/bw/bex?cmd=ldoc&infocube=ZMC_SRH1&query=AGINGV21A&sap-language=EN(working link)
am getting below link...which is getting an error....
http://128.222.125.57:9000/sap/bw/://:/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.sap.pct!2fplatform_add_ons!2fcom.sap.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?QUERY=AGINGV21A
above marked is the unwanted thing so how can i change my link in query designer???
please suggest me firneds -
Error executing a query using VPD and BC4J
Hi all,
Our team is developing an application using an Oracle DB 9.2.0.4 and BC4J 10g (9.0.5.16.0) as persistence layer.
We also are using the VPD (virtual private database) to have security in the database at row level.
The problem we are facing is that every some time (days) we get a jdbc error when a query (see below) that uses VPD policies is executed. Once the error occurs I execute it from sqlplus without getting any error .. it only occurs from our java application.
To temporary solve this problem, we delete and recreate the VPD policies, then the application continue working fine for some time ...
I'll appreciate any comment / suggestions
Thank in advance.
Eduardo.
ERROR LOG:
oracle.jbo.SQLStmtException: JBO-27122: SQL error during statement preparation. Statement: SELECT * FROM (SELECT CalLocation.ID,
CalLocation.CODE, eo
CalLocation.NAME,
CalLocation.ZIP,
CalLocation.PHONE,
CalLocation.FAX,
CalLocation.ADDRESS1,
CalLocation.ADDRESS2,
CalLocation.URL,
CalLocation.OWNER,
CalLocation.CTY_ID,
CalLocation.DESCRIPTION,
ORefCity.CODE CTY_CODE,
ORefCountry.ID CTR_ID,
ORefCountry.CODE CTR_CODE,
ORefRegion.ID REG_ID,
ORefRegion.CODE REG_CODE
FROM CAL_LOCATIONS CalLocation,
OREF_CITIES ORefCity,
OREF_COUNTRIES ORefCountry,
OREF_REGIONS ORefRegion
WHERE ORefCity.ID = CalLocation.CTY_ID
and ORefCountry.ID = ORefCity.CTR_ID
and ORefRegion.ID = ORefCountry.REG_ID) QRSLT WHERE ( ( (CTY_ID = 867) ) )
## Detail 0 ##
java.sql.SQLException: Io exception: Broken pipe
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:345)
at oracle.jdbc.driver.OracleStatement.open(OracleStatement.java:717)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2605)
at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:387)The symptoms we have been getting are quite similar to the bug 3662364 .
I'm going to implement the patch for that bug and see what happend then.
Thank you very much for your help.
Regards,
Eduardo. -
Error in results when using cfqueryparam
I get an error in the result set when using cfqueryparam in a
SQL "IN" statement.
This is on RHE with CFMX 6.01 and an Oracle 10g DB
In this instance, the query should have returned 8
records...as confirmed using SQL Navigator
This works fine regardless of the number of prameters inthe
list contained in variables.mrkt_sctr:
and rms.mrkt_sctr_id in (#variables.mrkt_sctr#)
If I do this:
and rms.mrkt_sctr_id in (<cfqueryparam
cfsqltype="cf_sql_varchar" list="yes" separator=","
value="#variables.mrkt_sctr#">)
I only get 7 results(debug info says seven and there are only
7 records listed)...the results that would have been generated by
the second parameter in the list of market sectors is ignored int
he results. If a 3rd market sector is added, I see the results of
the 1st 2 market sector id's...but the 3rd is ignored. If I put the
query (as output by the CF debug info) into SQL Navigator and
replace the ?'s withthe actual values...I get the appropriate
number of results. IF you look at the results on the webpage, the
results that would have been generated by the 3rd parameter are
missing.
There is nothing else in the code that would limit the number
of rows rerturned by the query.
Any Ideas?
Thanks
Eric Roberts
Owner/ColdFusion Developer
Three Ravens Consutling
http://www.threeravensconsulting.comDo you know how to use the 'result' parameter of the query
tag to get
the actual, complete SQL statement sent to the database.
Looking at
this may tell you what your issue is. -
Dear All,
I am using the following in a PL/SQL Before Header process.
Please help me with the following :
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B ('LEASE', 'SELECT LSE_NUM
FROM RE_LEASE
WHERE LSE_COM_NUM = :P0_COM_NUM');I am getting the following error:
ORA-20104: create_collection_from_query_b Error:ORA-20104: create_collection_from_query ExecErr:ORA-01008: not all variables bound
If I change the above as
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B ('LEASE', 'SELECT LSE_NUM
FROM RE_LEASE
WHERE LSE_COM_NUM = ' || :P0_COM_NUM);Then I get the following error :
ORA-20104: create_collection_from_query_b Error:ORA-20104: create_collection_from_query ParseErr:ORA-00936: missing expression
I am using the above to create Next and Previous buttons using the reference provided by ATD in the Re: How to do page break
Note: If I do not use any Items in the WHERE as below then I do not get any errors and it works as required.
APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B ('LEASE', 'SELECT LSE_NUM
FROM RE_LEASE');I want to use Items in the query for the collection. Please help.
Best Regards
Arif KhadasHi Jari,
Thanks Jari for the reply. Your solution does work as well but please if you can throw some more light on q'! (first line) and !' (last line).
q'!
SELECT LSE_NUM
FROM RE_LEASE
WHERE LSE_COM_NUM = (SELECT v('P0_COM_NUM') FROM DUAL)
!'Best Regards
Arif Khadas -
Error executing a query using a DB-Link
Hi all,
I'm trying to execute a query on a DB using a connection. I created a DB-LINK on the DB. executing the select:
select sysdate from dual@lnk_db_prod;
I get the following error:
Error starting at line 1 in command:
select sysdate from dual@lnk_db_prod
Error at Command Line:1 Column:19
Error report:
SQL Error: ORA-01882: timezone region not found
ORA-02063: preceding line from lnk_db_prod
The error will be return executing any query on a db-link.
It appens if I create a db-link using syntax referencing the SID and using the sintax with the complete connection string. Below the two example of db-link DDL commands:
1.
CREATE DATABASE LINK lnk_db_prod
CONNECT TO prod IDENTIFIED BY prod
USING 'DBPROD';
2.
create database link lnk_db_prod2
connect to prod
identified by prod
using '(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS =
(PROTOCOL = TCP)
(Host = 10.41.54.156)
(Port = 1521)
(CONNECT_DATA = (SID = DBPROD)
Can you help me, please?
bye,
IvanHi,
You would be better off posting / searching on other Oracle forums that deal more specifically with Application Servers. I googled "WebLogic set time_zone" and the first three hits were from our forums:
Default TimeZone
How to fix msg=ORA-01882: timezone region not found
http://kr.forums.oracle.com/forums/thread.jspa?messageID=9400587
I hope one of the these is what you are looking for.
Regards,
Gary Graham
SQL Developer Team -
"Error While copying query using RSZC
Hi Community,
I am trying to copy queries from Info Cube to Multiprovider using RSZC, I got error called
"InfoObject 0MATERIAL__0DIVISION missing from target InfoCube ZSCMIM_M1"
"InfoObject 0MATERIAL__MATL_CAT missing from target InfoCube ZSCMIM_M1"
"InfoObject 0MATERIAL__MATL_GROUP missing from target InfoCube ZSCMIM_M1"
"InfoObject 0MATERIAL__MATL_TYPE missing from target InfoCube ZSCMIM_M1"
"InfoObject 0PLANT_COUNTRY missing from target InfoCube ZSCMIM_M1"
I created Multiprovider with one basic info cube in BI 7.0. by draging dimensions,keyfigure, Unit, time from left to right than I selected the "Select key figures Icon" --> Selected Create proposal for all Infoobjects" same as for Charecteristics.
I checked the attributes and charecterisctics they are active. Please help me ....
Regds
Dave.Hi Bhanu,
There are so many other Navigation Attributes for 0Material and 0Plant info objects but I can only see this few attributes as error. I have a dought can I copy queries from Info Cube to Multiprovider. Please is there any particular reason .... I am getting this errr..... Please help me...
Regds
Dave. -
Hi all,
I have a problem with total row for one key figure in the query
Example:
customer QTY OGNEW OGOLD %OG
1000 300 50 10 4
2000 500 70 20 2,5
tot 800 120 30 10
The problem is in the total row of column %OG.
The %OG is calculated as %OG=OGNEW-OGOLD/OGOLD, but the value in total row is wrong, why?
In the property of %OG I have setting not definition in the 'calculate result as' because must be calculate with the formula.
Can You help me please?
Thanks in advance
GianmarcoThe formula is already built as
%OG=OGNEW%OGOLD
and in property of key figure I've setting nothing defined,
Unfortunately I don't obtain right result.
Any suggest please?
Gianmarco -
Error in select query using join
hi all
please help.
The follwing code givs this error....
select skb1-bukrs ska1-ktoks skb1-saknr skb1-waers skb1-xsalh skb1-xopvw skb1-xkres
into corresponding fields of table it_skab1
from ( skb1
OUTER JOIN ska1 on ska1-saknr=skb1-saknr ) .
*Error while executing....*
Program ZABHI_FIREPORT
"(" has no closing ")".
Please guide me for the correct syntax.
Thank u.hi,
use this code n check
tables: ska1,skb1.
data: begin of it_skab1 occurs 0,
bukrs like skb1-bukrs,
ktoks like ska1-ktoks,
saknr like skb1-saknr,
waers like skb1-waers,
xsalh like skb1-xsalh,
xopvw like skb1-xopvw,
xkres like skb1-xkres,
end of it_skab1.
select skb1~bukrs
ska1~ktoks
skb1~saknr
skb1~waers
skb1~xsalh
skb1~xopvw
skb1~xkres
from skb1 left outer join ska1 on skb1saknr = ska1saknr
into corresponding fields of table it_skab1 up to 10 rows.
loop at it_skab1.
write: / it_skab1-bukrs,it_skab1-ktoks,it_skab1-saknr,it_skab1-waers,it_skab1-xsalh,
it_skab1-xopvw,it_skab1-xkres.
endloop.
n let me knw is ur doubt cleared
rgds
shivraj
Edited by: ShivrajSinha on May 27, 2009 8:27 AM -
Getting an error when i am execution a BI query using ABAP.
Hi Expert,
I am getting an error when i am execution a BI query using ABAP. Its Giving me this Error "The Info Provider properties for GHRGPDM12 are not the same as the system default" and in the error analysis it saying as bellow.
Property Data Integrity has been set differently to the system default.
Current setting: 0 for GHRGPDM12
System default: u2019 7 u2018
As I am very new to BI and have very limited knowledge, so I am not able to understand this problem. Can any one help me to resolving this issue. Previously it as working fine, I am getting this error last 2 days.
when i am debugging , I am getting error from
create instance of cl_rsr_request
CREATE OBJECT r_request
EXPORTING
i_genuniid = p_genuniid.
this FM. Its not able to create the object. Can any one please help me out.
Thanks in advance.
Regards
SatrajitHi,
I am able to solve this problem
Regards
Satrajit -
Error while trying to use '{' in the query
Hi,
The below mentioned query is giving Error while trying to use '{'
Query:
select s,x from table(SEM_MATCH(
'{?s rdf:type <http://www.cs.com/sbip/dwh/mdm/data_modeling#Base_Term> .
?s ?p ?x}',
SEM_Models('foundation'),
SEM_RuleBases('OWLPRIME'),
SEM_ALIASES(SEM_ALIAS('dm','http://www.cs.com/sbip/dwh/mdm/data_modeling#'),
SEM_ALIAS('owl','http://www.w3.org/2002/07/owl#')), null, 'INVALID'))
where regexp_like(x,'Customers','i');
Error details:
ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.rdf.server.TokenMgrError: Lexical error at line 1, column 1. Encountered: "{" (123), after : ""
ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 178
ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 67
ORA-06512: at line 4
I am unable to use Option, Filter in query.
Any solution?
Please let me know do i need to apply any patch?
Note: I am using Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
Regards,
Kavitha.Hi,
For OPTIONAL support in 11.1.0.7.0, you need the following patch
Patch 7600122: CURLY BRACE SYNTAX,VIRTUAL MODELS, NETWORK INDEXES AND HINTO FRAMEWORK SUPPORT
Support for SPARQL FILTERs in SEM_MATCH is not available for 11.1.0.7.0. You will need version 11.2.0.1.0 or later for FILTER support. With 11.2.0.1.0, we recommend that you apply our latest patch set:
Patch 9819833: SEMANTIC TECHNOLOGIES 11G R2 FIX BUNDLE 2
All of the above patches are available through My Oracle Support.
Thanks,
Matt -
How to make use of the presentation variable in SQL result query
I have 2 prompts in my dashboard.
Prompt1 decides the values of Prompt2.
I have set a presentation Variable (selected_comp) in prompt1 which holds the value selected.
To populate the values for Prompt2, I need to execute a query using the presenation variable set by Prompt1.
SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=@{selected_comp}
the query is resulting into
SQL Issued: SELECT "List Of Values".RID from rocketv2_3 WHERE "List Of Values".NAME='COMPONENT' AND "List Of Values".VAL=0
but the value in selected_comp is "ABC".
Can anybody help in how to make use of the presentation variable in query to get the correct value
thanks
ShubhaJust use constrain check box to filter your 2nd prompt values based on the 1st prompt.
Thanks,
Venkat
http://oraclebizint.wordpress.com -
Error when trying to use this query in report region
Hi ,
I am getting "1 error has occurred
Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. ORA-00933: SQL command not properly ended"
while trying to use this query in reports region .
Pls help.
Thanks ,
Madhuri
declare
x varchar2(32000);
begin
x := q'!select (first_name||' '|| last_name)a ,
count(distinct(session_id)),manager_name
from cappap_log,
MIS_CDR_HR_EMPLOYEES_MV
where DECODE(instr(upper(userid),'@ORACLE.COM',1),0,upper(userid)||'@ORACLE.COM',upper(userid)) = upper(email_address)!';
if :P1_ALL = 'N' then
x:= x||q'!and initcap(first_name ||' '|| last_name)=:P1_USERNAME!';
else
x:= x||q'!and initcap(first_name ||' '|| last_name)like '%'|| :P1_USERNAME||'%'!';
end if;
if :P1_APP_NAME = '%' then
x:= x||q'! and flow_id like '%'!';
else
x:= x||'flow_id = :P1_APP_NAME';
end if;
x:= x||q'! group by first_name||' '|| last_name , manager_name!';
return x;
end;Hi, I am actually stuck here. Can you please let me know which among these is the higher version.
1) Final Release 3.50
Version 3500.3.016
2) Final Release 3.50
Version (Revision 481)
Because it is working fine in the 1st one whereas its throwing that error pop-up in 2nd one(as soon as we select the Change query global definition option) . -
Strange results from JDBC Query using a VARRAY
Here's one for you experts:
I have a 9i release 2 db set up, to which I connect via the JDBC thin
driver. I have a JavaServer Pages application that needs to read a VARRAY
from a table and then use the contents of the VARRAY. Here's the code in
the JSP that does that:
resultset=db.executeQuery
("SELECT IMAGE_lIST FROM PAGE_IMAGE_ARRAY WHERE PAGENAME = " +
pagename);
oracle.sql.ARRAY array =
((oracle.jdbc.driver.OracleResultSet)resultset).getARRAY(1);
imageList = (String[])array.getArray();
for(int count=0; count<imageList.length; count++)
out.println("<p>The image at position " + count + " in the array is
the image titled: " + imageList[count]);
The JSP compiles and runs fine, but the output is as follows:
The image at position 0 in the array is the image titled: 0x7465737431
The image at position 1 in the array is the image titled: 0x7465737432
The image at position 2 in the array is the image titled: 0x7465737433
The image at position 3 in the array is the image titled: 0x7465737436
A query using SQL*Plus verifies that the actual values of the elements of
the array are 'test1', 'test2', 'test3', 'test6'. Notice that the last
digit in the hex(?) output matches the last digit of the actual string.
What's causing this? It looks like a data type mismatch, but I would have
thought that such an error would have triggered a compile-time error.
Any help is greatly appreciated.
Regards,
Dave PennDave,
The following should help.
1 select rawtohex('test1') val1,
2 rawtohex('test2') val2
3* from dual
SQL> /
VAL1 VAL2
7465737431 7465737432
SQL> select rawtohex('1') val1,
2 rawtohex('2') val2
3 from dual;
VA VA
31 32 -
Problem in finding Exact result by using the following Query
Hello,
I am finding difficulty in producing the required result by using the following Query in Reports 6i
(Note: - The query actual output and the required output are as follows: -)
SELECT
DISTINCT
SH.S_HEAD_CODE,
B.BILL_ID,
B.SANCTION_DATE,
E.EMP_NAME,
E.EMP_DESIGNATION,
B.TOTAL_BILL,
NVL((SH.INITIAL_ALLOCATION-B.TOTAL_BILL), 0) BALANCE
FROM BILL B, PARAMETERS P,SUB_HEAD SH, EMPLOYEES E, BILL_DETAIL BD
WHERE
SH.S_HEAD_CODE=B.S_HEAD_CODE
AND B.S_HEAD_CODE=BD.S_HEAD_CODE
AND B.EMP_ID_NO=E.EMP_ID_NO
AND B.BILL_ID=BD.BILL_ID
The Output of the above query is as follows: -
Let say we have Total Amount Sanctioned Rs. 15,000,00/-
Name Total Bill (Rs.) Balance (Rs.)
Sohail 7147 1492853
Saqib 2131 1497869
Amir 6802 1493198
Shafiq 1214 1498786
Note:- In the above output the above query is subtracting the current balance from Total Sanctioned Amount (Rs. 1500000) each time, but
it should actually subtract the current bill amount from the previous balance like the below said result.
Name Total Bill (Rs.) Balance (Rs.)
Sohail 7147 1492853 {Previous Balance - Current Bill Amount (1500000-7147) }........ The previous balance was actual amount Rs. 1500000
Saqib 2131 1490722 {Previous Balance - Current Bill Amount (1492853 - 2131)}
Amir 6802 1483920 {Previous Balance - Current Bill Amount (1490722 - 6802)}
Shafiq 1214 1482706 {Previous Balance - Current Bill Amount (1483920 - 1214)}
Results Continue...........................
Please help me to solve this problem.
Thank you in advancejust check if this meets your requirements,
SQL>
SQL> With t As
2 (
3 Select 'Sohail' c1 ,7147 c2 ,1492853 c3 From dual Union All
4 Select 'Saqib' ,2131 ,1497869 From dual Union All
5 Select 'Amir' ,6802 ,1493198 From dual Union All
6 Select 'Shafiq' ,1214 ,1498786 From dual
7 )
8 Select c1,
9 c2,
10 prv_amt - c2 current_amt
11 From
12 (
13 Select c1,
14 c2,
15 c3,
16 lag(c3,1,1500000) over(Order By c3) prv_amt
17 From t
18 );
C1 C2 CURRENT_AMT
Sohail 7147 1492853
Amir 6802 1486051
Saqib 2131 1491067
Shafiq 1214 1496655
SQL>
Maybe you are looking for
-
Hi, new to the forums and apple tbh. Moving into a new house and want to set up a sound system, thought apple would be the way to go as I have iPads, iPhones, iPod touch and nanos. I also have a few sets of Bose speakers which I would like to incorpo
-
Archive Stock Cube with non-cumulative nature
Hi All, I have been trying to archive the Inventory (Stock) Infocube as we have more than couple of hundread million records in the cube and it is taking long time to execute query. I know how to acrive the regular cubes and DSOs, but I couldn't find
-
Font Book & Access for Applications
I have been having some problems with my fonts. My 1st question is whats the difference between computer font list and user font list? Some of my programs like PS do not have access to all of the fonts. Photoshop cs5 has more fonts than ps cs6. Its t
-
E71 Music too big for ringtone?
How do you compress the music you have already in m4a size from PCSuite, to a smaller size so that the E71 can use the music as a ringtone? I have over 200+ songs on my phone and it won't use any of them as a ringtone. And why is the volume of the ri
-
I'm importing from the raw P2 MXF files for the first time .. everything seems incredibly self explanatory except for one glaring thing -- is there no way too preview audio when setting your ins and outs?? (Final Cut 5.1.4). I can not see an option f