Normal query display nothing
hi,
i'm reporting very strange behaviour:
I've a pl/sql function body returning sql that generate correctly an sql.
The query retrieve several data (more than 10000) (i've a debugging field on my page, that displays the content of the query).
When i paste the query inside oracle sql developer the data are retrieved correctly.
However in apex the report displays
report error:
ORA-01403: no data found
The story is that the datas are in for sure by the way i've copied /pasted this query in another report and it works correctly:
Any issue for you about the syntax or regard some item prop??
SELECT TBCONTATTI.NORECORD NR, ROWNUM, TIPOLOGIA,
COGNOME,NOMEPROPRIO,NAZIONE, CAP,
COMUNE, IDENTITA FROM TBCONTATTI, CORRISPONDENZA WHERE CORRISPONDENZA.RELCLIENTE=TBCONTATTI.NORECORD
by the way i've copied /pasted this query in another report and it works correctly:
Any suggestion would be great
thanx
hi,
FORGET the previous post: i have to practice a little bit with Apex:
the story is that i was using pl/sql function returning sql query and first time i ran the queries, it was working correctly why i got the same columns in a couple of conditional selects(why populates conditionally the same report region).
When i've changed the columns suddenly one of the queries started to return NO DATA FOUND inside the report because (i've simply added another to a select) i was not aware to change as well Use Generic Column Names (parse query at runtime only).
I found that this is absolutely required inside your pl/sql RSqlQ.
That's all: i've to discover APEX a little in depth.
However a better message then NO DATA FOUND, would be better when you have pl/sql RSqlQ. Would be interesting to have ' Nr of columns doesn't match what specified in report attributes/region definition. Try to use generic columns and headers'
Maybe is difficult to detect a situation like this...
thank you a lot however
Message was edited by:
Marcello Nocito
Message was edited by:
Marcello Nocito
Similar Messages
-
Convert normalized query to procedure to function
Hi,
I have a table with this structure:
CREATE TABLE TRANS
ITEM_ID VARCHAR2(8 BYTE),
ITEM_TYPE VARCHAR2(20 BYTE),
ITEM_YEAR NUMBER,
JAN FLOAT(126),
FEB FLOAT(126),
MAR FLOAT(126),
APR FLOAT(126),
MAY FLOAT(126),
JUN FLOAT(126),
JUL FLOAT(126),
AUG FLOAT(126),
SEP FLOAT(126),
OCT FLOAT(126),
NOV FLOAT(126),
DEC FLOAT(126)
)I wrote the following PL/SQL to normalize the data into a few columns. Now I need help converting this to a package procedure, and this is where I am stuck.
DECLARE
TYPE c IS REF CURSOR;
cur c;
TYPE r IS RECORD (
itm trans.item_id%TYPE,
mth VARCHAR2 (3),
val FLOAT
rec r;
stmt VARCHAR2 (200);
item VARCHAR (8) := 'AB054240';
BEGIN
FOR i IN 1 .. 12
LOOP
-- calls function to return abbreviated month name
stmt :=
'SELECT item_id, get_month_abbrev ('
|| i
|| '), '
|| get_month_abbrev (i)
|| ' FROM trans t WHERE t.item_id = '''
|| item
|| '''';
OPEN cur FOR stmt;
LOOP
FETCH cur
INTO rec;
EXIT WHEN cur%NOTFOUND;
-- test
DBMS_OUTPUT.put_line ( rec.itm || chr(9) || rec.mth || chr(9) || rec.val);
END LOOP;
END LOOP;
CLOSE cur;
END;In searching online, I got the idea of creating an Object Type for the 'record' type and a Collection Type for the table based on the former.
I would then open the table using a sys_refcursorUnfortunately, I could not get this to work. Ideally I would like to keep it all encapsulated in one procedure. I can't figure out a way to make an OUT parameter that will hold the table.
The end result is that I have a client program that will execute this procedure/function to return the normalized query result set for display.
Any suggestion or critique would be appreciated.I still don't understand why you feel the need for looping round to create your dynamic SQL when you could just use static SQL (eg, like the query I gave you earlier)?
If you're wanting to take a row and turn it on its side, then the query I provided would do what you wanted:
with trans as (select 1 item_id, 'A' item_type, 2009 item_year, 10 jan, 20 feb, 30 mar, 40 apr, 50 may, 60 jun, 70 jul, 80 aug, 90 sep, 100 oct, 110 nov, 120 dec from dual union all
select 1 item_id, 'A' item_type, 2008 item_year, 110 jan, 120 feb, 130 mar, 140 apr, 150 may, 160 jun, 170 jul, 180 aug, 190 sep, 1100 oct, 1110 nov, 1120 dec from dual union all
select 2 item_id, 'C' item_type, 2009 item_year, 210 jan, 220 feb, 230 mar, 240 apr, 250 may, 260 jun, 270 jul, 280 aug, 290 sep, 2100 oct, 2100 nov, 2120 dec from dual),
-- end of mimicking data in your table
month_tab as (select 'JAN' month_name from dual union all
select 'FEB' month_name from dual union all
select 'MAR' month_name from dual union all
select 'APR' month_name from dual union all
select 'MAY' month_name from dual union all
select 'JUN' month_name from dual union all
select 'JUL' month_name from dual union all
select 'AUG' month_name from dual union all
select 'SEP' month_name from dual union all
select 'OCT' month_name from dual union all
select 'NOV' month_name from dual union all
select 'DEC' month_name from dual)
SELECT tr.item_id "Item",
mt.month_name "Month",
DECODE(mt.month_name, 'JAN', tr.jan,
'FEB', tr.feb,
'MAR', tr.mar,
'APR', tr.apr,
'MAY', tr.may,
'JUN', tr.jun,
'JUL', tr.jul,
'AUG', tr.aug,
'SEP', tr.sep,
'OCT', tr.oct,
'NOV', tr.nov,
'DEC', tr.dec) "Amount"
FROM trans tr,
month_tab mt
WHERE tr.item_id = 1 --p_item_id
AND tr.item_year = 2009 --p_item_year;
Item Month Amount
1 JAN 10
1 FEB 20
1 MAR 30
1 APR 40
1 MAY 50
1 JUN 60
1 JUL 70
1 AUG 80
1 SEP 90
1 OCT 100
1 NOV 110
1 DEC 120There are several advantages for using one static query:
1. Easier to debug: the query is right there - you can copy it out of the procedure, change the parameters and then run it to see what values were being returned. You do not have to manually construct the query prior to running it.
2. Less code, less steps - therefore increased performance and easier maintenance. You no longer have an extra function call that the database needs to execute every time it runs the query.
3. More efficient code; no need to access the table 12 times, as the above query only accesses the table once. Again, leading to improved performance.
4. Easier to read and there maintain.
5. The PL/SQL engine won't check dynamic sql until runtime; if you've made a syntax error, the code will still compile, but will fail at runtime. With static SQL, the code won't compile until you've fixed all syntax errors.
6. Dynamic sql won't show up in the dependencies views (eg. user_dependencies), so makes it harder to track what tables are used by your code.
In short, avoid dynamic SQL if you can, stick to doing as much of the work in SQL as you can and hopefully you'll have faster and easier-to-maintain code. -
Display Nothing in table column heding when parameter doesn't have any value
Hi,
I created one tabular report . Report has 2 parameters(ex: A and B) both have default values from two different datasets. I am using these parameters in two column headings (col1 has parameter A and col2 has parameter B) in report. My question is, if parameters(A
and B ) don't have any value from the datasets it should display "Nothing" in the table column headings(col1 and col2). If parameters(A & B) have some value(June & July respectively) it should display in table column headings(col1 and col2).
Thanks in advance,
VisuHi Visu,
According to your description, you want to display the value of two parameters in two column headers. Parameter A in col1, parameter B in col2. And if the parameter returns null value, it should display “Nothing” in the header. If the
parameter return a value, the value should be displayed in the column header.
If in this scenario, in order to achieve your requirement, we can refer to the following expression in the two column headers:
=iif(Parameters!ReportParameter_name.Value
is nothing,"Nothing",Parameters!ReportParameter_name.Value)
If there are any misunderstanding, please elaborate the issue for further investigation.
Thanks,
Katherine Xiong
Katherine Xiong
TechNet Community Support -
Screen Painter displays nothing and becomes hang.
<b>Screen Painter displays nothing and becomes hang.</b>
To duplicate:
1. Create a new table and fields. (I created using SQL Enterprise Manager).
2. Create a new form using Screen Painter.
3. Bound several items to column to field of table created on step#1
4. Save and close the form in .srf.
5. Open the saved form and Screen Painter becomes hang.
Is there any mistakes in my steps? Or this is just a Screen Painter Bug?
Thanks in advance,
Jemmy SentoniusWhen creating new tables, make sure to create them via SAP. You can achieve this by either manually creating tables via SAP client or programmatically using DIAPI.
When you bind data to a form via UIAPI (either programmatically or via xml/srf) SAP needs to know the tables you refer to.
When you create tables using Enterprise Manager, SQL Server knows about the tables, SAP does not. Hence your error, I guess.
However Screenpainter should not hang when referencing "invalid" (to SAP) tables. This behaviour ought to be corrected.
HTH Lutz Morrien -
hey plz help me out!! i am using macbook pro 10.5.8..... and was using photobooth...and then after some time i opened it and there was no green light on cam, and it displayed nothing! plz tell me how to fix it! i want to see my face again!!! plz help me
iSight troubleshooting
http://support.apple.com/kb/HT2090 -
Getting a early watch alert in production for query display.
Hi All,
Getting a early watch alert in production for query display.
Number of Excel cells send to frontend: 78630 cells to the frontend on average.
Please suggest to overcome and rectify in the production environment.
Regards,
SiddhardhSiddhard,
To set u201CAverage number of Excel Cells send to Frontendu201D to remove/ extend the set 30000 as parameter
We need to execute the report SAP_RSADMIN_MAINTAIN with parameters
o OBJECT = MPRO_MAX_RESULT
o VALUE = <maximum size of the interim result in kilobytes>
Reference: Note # 630500
Hope this helps.
-RajNi Reddy -
Normal string display to Hex string display
Hi all
i like to convert a normal strijng display which contains alphanumeric strings to hex format
String length will be of 25 characters which will be read through bar code reader
Could someone help me in solving this
Thanks
BalaHi smercurio_fc
Thanks for the vi. i tried the method which you have sent me.
So i cant transfer 'S' through serial port?
Is there any other way to transmit this through Serial port.
Also i need another clarification
A sub vi is running inside my main vi and i need to stop/pause the sub vi from the main vi front panel. how could i can stop the sub vi?
Thanks and regards
Bala -
Authorization Object for role creation for query display?
Hi,
Can Anybody here tell me what is the Authorization object that we use for role creation for query display?
I want to assign a role to the newly designed query! that query does not have any role so far!
Pls suggest me
Thanks,
RaviHi,
I could make the authorization tab green by entering the authorization object!
But user tab still remains red as it is not allowing me to enter my username in the user tab!
in the user tab i am unable to enter my user name?
Any suggestions?
Thanks,
Ravi -
how can i fix my iphone 3g if and only it displays the apple logo when it is connected to its charger but it displays nothing when the charger is removed?
Plug it into a wall outlet and leave it plugged in for approximately 20 minutes.
Then try a reset by pressing and holding the home and power buttons for 15-20 seconds.
Does the device power on at this point? If not, the battery or logic board is gone.
Take it to Apple for evaluation.
It may be worth replacing the battery, but I personally wouldn't spend the $149US for an Out of Warranty replacement on a 3+yr old device. -
How to convert SQVI to a normal query in SQ01 under client-specific query
Dear all,
I would like to know how to perform the following. Can you show me step by step as I don't know how to use SQ01 nor SQVI.
Convert SQVI to a normal query in SQ01 under client-specific query area
Thanks
tuffy
Thien is right. Invest some time into researching the above mentioned topics before turning to the forums for help.
Edited by: kishan P on Aug 25, 2010 10:24 AMHi,
If you don;t know any of them. I think you should take a little time to research or search from Google, SDN wiki,...
regards, -
Replace joins with normal query
hi experts ,
can u help me out splving in this issue.
i want to convert this query in to normal query I.e with out usin gany joins .pls help me out.
select a~ebeln
b~ebelp
b~loekz
a~bukrs
a~wkurs
a~lifnr
a~ekorg
a~ekgrp
a~waers
a~bedat
b~txz01
b~menge
b~meins
b~netpr
b~elikz
b~erekz
b~wepos
b~weunb
b~repos
b~webre
b~matkl
c~eindt
from ekko as a
inner join ekpo as b
on aebeln eq bebeln
inner join eket as c
on bebeln eq cebeln
and bebelp eq cebelp
into corresponding fields of table t_ekko_ekpo
where a~bukrs in s_bukrs
and lifnr in s_lifnr
and ekorg in s_ekorg
and ekgrp in s_ekgrp
and a~bedat in s_bedat.
and c~eindt in s_eindt.
Thanks in advance ,Hi all,
Can someone tell me if it is possible to replace a
call like
<jbo:ShowValue datasource="dsNews"
dataitem="NisStory" /> with
String s = jbo.ShowValue(dsNews,NisStory)? Or if there
is another way to get the output of the tag into a
String?One way to do it would be to wrap the execution of <jbo:ShowValue/> with a body tag that captures its body and writes it to a variable in the pageContext. The usage would be something like:
<mytaglib:capture var="aString">
<jbo:ShowValue/>
</mytaglib:capture>
the capture tag handler would take the body content in the doAfterBody callback and expose it as "aString" in the pageContext attributes.
>
Thanks in advance.
Regards BasBr - J -
Master data query display limited to 10000 records
Hi,
When I run a query based on master data objects like 0CUSTOMER, the query displays only 10000 records instead of about 50000. This happens with all other master data items. This happens after the upgrade to 2004S. We still use frontend 3.5. Transaction data displays are correct. Has anybody faced this problem? Can someone suggest the solution for this?
Thanks.
ParamHi
Check out note -
<b>955487</b>- Master data InfoProvider reads only 10000 records
Implement the advanced corrections as SP-09 is too far to be released.
Hope it Helps.
Chetan
@CP.. -
Hi there,
DW CS3, PHP mySQL DB.
I have a:
Search Page: Works!
Results Page: Works!
Details Page: Does not display any data!
For some reason my Details page displays nothing. I have the
"Goto
Details Page for PHP" server behaviour" from
http://www.dengjie.com/
I have other details pages that work excellent but cannot get
this to
work.
My details page's SQL looks like this:
SELECT *
FROM test
WHERE p_ID = colname
Name: colname
Type: numeric
Default Value: -1
Run-time Value: $_GET['p_ID']
The fields I want to display are binded with the
corresponding fields of
the DB.
Please help me out.
Regards,
DeonHi there,
DW CS3, PHP mySQL DB.
I have a:
Search Page: Works!
Results Page: Works!
Details Page: Does not display any data!
For some reason my Details page displays nothing. I have the
"Goto
Details Page for PHP" server behaviour" from
http://www.dengjie.com/
I have other details pages that work excellent but cannot get
this to
work.
My details page's SQL looks like this:
SELECT *
FROM test
WHERE p_ID = colname
Name: colname
Type: numeric
Default Value: -1
Run-time Value: $_GET['p_ID']
The fields I want to display are binded with the
corresponding fields of
the DB.
Please help me out.
Regards,
Deon -
How to print - when query returns nothing
Hi All
I have query...
select sum((sum(nvl(ac.amtsourcedr,0))-sum(nvl(ac.amtsourcecr,0)))) as balance
from fact_acct ac
where ad_client_id=1000000
and dateacct < '1/04/2010'
and ac.account_id=1000432
group by ac.account_id
I want to print zero when query returns nothing
how to do that ..???
thanking you in advance
Regards
gauravuse NVL
select nvl(sum((sum(nvl(ac.amtsourcedr,0))-sum(nvl(ac.amtsourcecr,0)))),0) as balance
from fact_acct ac
where ad_client_id=1000000
and dateacct < '
and ac.account_id=1000432
group by ac.account_idAnd yes you need to remove the Group By as stated by Toon, forgot to mention it
Edited by: Karthick_Arp on May 27, 2010 4:04 AM -
Hello,
I just purchased a Creative Cloud Lightroom + Photoshop subscription and installed Creative Clood. It launches but displays nothing and seems to refresh indefinitly. What to do?
Here is what I get :
Nothing happens. It keeps on turning. What should I do?
Thx!
Quentin GiroudFound that. Worked for me :
Close the Creative Cloud application.
Navigate to the OOBE folder.
Windows: [System drive]:\Users\[user name]\AppData\Local\Adobe\OOBE
Mac OS: /Users/[user name]/Library/Application Support/Adobe/OOBE folder
Delete the opm.db file.
Launch Creative Cloud.
Maybe you are looking for
-
How do I upgrade camera raw codecs in adobe cs 5
How do I upgrade The CAMERA RAW CODECS in Adobe CS5?
-
I have an iPhone 4 running iOS 6 and a MacBook Pro running Mountain Lion. For some reason, my desktop will recieve iMessages and they will never go to my phone, even though it's on, has service, and iMessage is activated. I just want to make it so th
-
For the third time in a week, Verizon tells me I must subscribe to access certain channels on line. However I am a subscriber to all of them! I have spent over 3 hours on the phone and here I am yet again unable to access anything! Is there a direct
-
Regarding Sender query and receiver query
Hi Masters I have one sender query and receiver query. Both queries contain G/L account. First I got sender query report, in this report I drill down one free charactteristics field to get correponding field sales document in receiver report. I
-
Is it possible to join two video files?
Is there any way i can use mac os to join two AVI files together, and then create a new copy of the combined video to show on my iPad. if i can avoid using iMovie that would be great. thanks