Number of rows fetch are not same
Hello all,
i am new to sql/plsql
Oracle version 11R2
OS RHL 5.0
i am trying to delete all the rows from parent table as well as from child tables based on some date criteria.
the parent table BE_STATUS contains one column OOC_DT. based on the OOC_DT i am fetching rows from Parent Table BE_STATUS.
other child tables DO NOT have OOCDT column but are having BENO and BEDT WHICH are also in PARENT TABLE BESTATUS.
So i am fetching all be_no,*be_dt* from BE_STATUS based on the column OOC_DT as below
select distinct(count(*)) from be_status where ooc_dt between '31-mar-10' AND '24-dec-10';
(COUNT(*))
65074 and i am creating a temp table based on the above query as
create table temp as select be_no, be_dt from be_status where ooc_dt between '31-mar-10' AND '24-dec-10';
table created.and then i am counting the number of rows in temp table
select distinct(count(*)) from temp;
(COUNT(*))
65074 so there are around 51 child tables which are having the column BE_NO AND BE_DT.
so the total no of rows in temp should be equal to total of all rows in each and every column based on the criteria above.
that is
select distinct(count(*)) from be_penal where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
64
select distinct(count(*)) from be_fine where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
62
select distinct(count(*)) from be_cash_lic where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
23
select distinct(count(*)) from c_cl_be where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
2
select distinct(count(*)) from chex where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
0
select distinct(count(*)) from amend_q where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
0
select distinct(count(*)) from be_perm where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
889
select distinct(count(*)) from exam_instr where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
690
select distinct(count(*)) from c_rms_mesg where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
64982
select distinct(count(*)) from item_duty_fg where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
398129
select distinct(count(*)) from a_item_det where (be_no,be_dt) in (select be_no,be_dt from temp);
(COUNT(*))
31453
select distinct(count(*)) from item_det where (be_no,be_dt) in (select be_no,be_dt FROM temp);
(COUNT(*))
622271 so as u can see that TEMP TABLE contains only *65074* . so the sum of the counts of all the above tables should be *65074* but alone item_det contains
*622271* rows.
am i making any mistake in counting the records individually??
waiting for your usefull reply
thanks and regards
Not quite sure I follow your issue, but one glaringly obvious fault in your coding...
between '31-mar-10' AND '24-dec-10';dates should be treated as dates, not strings, and we left 2 digit years from programming standards waaay back in the 1990's when everyone fixed such issues as part of the millenium bug fixes.
between to_date('31-mar-2010','DD-MON-YYYY') AND to_date('24-dec-2010','DD-MON-YYYY');
Similar Messages
-
JDBC Sender Adapter - Restrict number of rows fetched, Oracle
Hi,
Is it possible to restrict the number of rows fetched by the JDBC Sender adapter at each run? What would the appropriate Select and Update statements be to make sure a limited number of rows are selected and flagged as processed?
We are connecting to a Oracle RDBMS.
//Johanhi,
have a look at this info:
about oracle and limiting number of rows
http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
Regards,
michal
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a> -
hi
Is there any way to get total number of rows fetched along with
result set in a single query
josHi,
You are referring to "Analytical Functions"
COUNT(*) OVER ()the above one your are counting the number of records, with respect to logical parition window -as if you specify with it the over clause. it won't provide the information as required, with respect to the your first post.
- Pavan Kumar N -
BP671 object currencies are not same in budget hierarchy
Hi,
We have set object curency in budget profile for budget currency and availablitity control.
Although all the wbs, networks and production orders use the same object currency, we are still getting the error "BP671 object currencies are not same in budget hierarchy"
Any solution / ideas to solve this error ?
Thanks,
ManoharThanks for your reply.
But i have already checked all three option in Query designer and executed in Bex Analyzer.
once again i am telling -(first time all posted and without posted node are apperaring but after swapping the axis in analyzer sheet only posted nodes are appearing)
Any other option is require for this please tell. -
BPM error: interface are not same
Hi,
In my BPM I opened a Asy/syn bridge. When I close it I get the error: A interface and B interface are not the same.
A is the interface (synch) which I used on the sender side when I opened the bridge. B is the aynch. abs. interface for the receiver side for which I defined a container.
A interface response and B interdace request are the same. Why do I get this error? Any idea.Make sure that you have created a SYNC interface (ABS) which refers to the Request and response messages....and then the COntainers in your BPM refer to these request and response messages only!
The COntanier should have the same message types as they are in the SYNC ABS message Interface..... as of now they are different and hence the error.
Just have a look at the BPM pattern which I mentioned in previous reply and you will know which message has to be include in the Receive and Send step.
Regards,
Abhishek.
Edited by: abhishek salvi on May 4, 2010 1:56 PM -
How to findout rows which are not null ?
Hi friends,
Can anyone tell me how to find out the no of rows which is having full data in each column (not null) ?
Ex:- TEST_TABLE having 1000 columns and lakes of rows.
myQuestion:- I need to find the no of rows which are filled with 1000 columns filled with not null data.
Thanks in Advacne.
Kishore.Hello
You're just going to have to write the query with IS NOT NULL on each column. This will help generate the predicates for the WHERE clause to save quite a bit of typing...
SELECT
' AND '||column_name||' IS NOT NULL'
FROM
all_tab_columns
WHERE
table_name = 'TEST_TABLE'You can take the output and add that to
SELECT COUNT(*) FROM test_table WHERE 1=1 HTH
David -
Datform's Rows & Columns are not displaying in Capital Expense Planning
Hi ,
Any one let me know why the Dataforms Row's & Columns are not displaying in Summary Reports Dataforms in Capital Expense Planning ,in 9.3.1 Version.
Any help on this appreciable...
Thanks.........As John mentioned, make sure that you aren't supressing the data. If there is no data in essbase and you are supressing missing data then there will be no rows. You can unselect "supress missing data" by going to admin>manage data forms. Select the data form in question and click edit, then navigate to the row/column tab and under row properties, ensure that the "supress missing data" check box is unselected.
You will want this unselected if users are going to input data in this form.
DQ -
Editable alv using OO ALV(newly edited row values are not updating )
Hi friends,
i am facing a problem. i am displaying an output alv using OO ALV.
i am creating a new row and validating the newly created row values and changing if it is not according to the criteria. but the newly edited values are not capturing in method
pr_data_changed->mt_inserted_rows as it contains values only entries entered for the first time .
i am not getting the newly edited values in it.
please do the needful.
Thanks and Regards,
srinivasHi!
to rectify the problem in the Code.....
You can Go through this program....for changed values....
https://wiki.sdn.sap.com/wiki/x/AwBIBQ
Regards. -
Smart Number and RFx Name are the same?
Hello all,
I am facing the following issue:
I activated smart numbering for my RFx documents. However, the field "RFx Name" is also being filled with the smart number, and I am not able to change it. Even if I define smart number as external, any change I make in one field is reflected in the other.
Can anyone help me with this? Is this related to any definition in customizing, i.e., do I say that the value in "Smart Number" is the same as in "RFx Name"?
Thanks in advance,
JoãWe got the following explanation from SAP:
The smart numbering was designed to use the existing description field
that is stored to database. Now both the fields on the UI are mapped to
this database field description. It was decided that in PPS we would
only have Smart numbering appearing as description across all BO's. If
you want to use RFx name then probably you have to create your own
custom field that would store this info to database. -
Return the column names for which the row values are not null.
Hi i m a new guy to db admin, and i need a sql script which should return column names of the particular table. and the returned column should have value (fyi - if the column has null value column name should not come in the sql o/p).
Exmple:
table name - A
s.no name mark status fee
1 aa 45 p null
2 bb 30 null paid
3 cc 35 p paid
fyi -1) if i give the table name(A) and s.no (2) the o/p should be -- name,mark.
2) if i give the tablename(A) and s.no (1) the o/p should be --- name,mark,status.
Thanks
Krishna.
Edited by: user13294228 on Jun 14, 2010 10:54 PMBTW,
The previous solution is for all values of the column, if you want a specific row, you can add it in where clause.
I mean in your example, it you look like:
SET serveroutput on;
DECLARE
l_cnt NUMBER;
l_str VARCHAR2 (255) := '';
l_table_name VARCHAR2 (255) := 'YOUR_TABLE_NAME';
l_col_cond VARCHAR2 (255) := 'S_NO';
l_val NUMBER := 1;
CURSOR c_col
IS
SELECT column_name
FROM user_tab_columns
WHERE table_name = l_table_name;
BEGIN
FOR i IN c_col
LOOP
EXECUTE IMMEDIATE 'SELECT COUNT ('
|| i.column_name
|| ') FROM '
|| l_table_name
|| ' WHERE '
|| l_col_cond
|| ' = '
|| l_val
INTO l_cnt;
l_str := l_str || CASE
WHEN l_cnt = 0
THEN ''
ELSE i.column_name
END || ',';
END LOOP;
l_str := SUBSTR (l_str, 1, LENGTH (l_str) - 1);
DBMS_OUTPUT.put_line (l_str);
END;Saad,
Edited by: S.Nayef on Jun 15, 2010 11:54 AM -
Key figure, number of decimal places are not showing in report output
Dear experts,
At cube level PO qty value is getting 0.010 where as in bex report output of PO qty showing as 0. I have chosen decimal places as 0.000 in key figure additional properties tab. In query designer also I have chosen no of decimal places as 0.000 in display propertiesu2026please help me out. How can I get 0.010 value in report o/p.
Thanks in advance.
Srivalli.Hi,
Try to run the query in RSRT. CHeck if you are getting the same output. Also make sure that in the reports all the filters are same as you have applied in the info -cube to see the data.
- Jaimin -
For adobe photoshop elements 13 the serial number and redemption code are not working.
Used redemption code to download elements 13 but serial number said invalid when trying to set up software.
Thanks, I tried it, but that did not work. Another Forum leader determined that I bought a WIN license and I have a MAC. Not sure how that happened. I have sent a message (hopefully given the absolute user unfriendly interface for any problems) to the Order folks. If they don't reply, i will cancel the credit card charge. That might get their attention. What a terrible company.
-
Sysdate changes when number of rows selected are huge
My requirement is that same date and time should be selected for all the rows returned by the query.
Eg: Select empno, ename , sysdate from Emp
If the query runs for more than a second, then the second component of SYSDATE will be different.
What I want is that the query firing time should be selected for all the rows returned by the query.
I hope there should be a way in Oracle to do thisHave you actually seen this happen?
On testing in Oracle 8.1.7i environment with a query
select col1, col2, to_char(sysdate,'hh24:mi:ss')
from big_table;
which returned approx 3m rows and executed for over 8 minutes the sysdate value was the same for the first row selected and the last row selected, and was the time at the start of the query.
Kevin is correct that Oracle gets the the value of Sysdate once when the query is executed and uses that value until the time that a new query is parsed.
HTH
Dave -
I am working in WORD through Citrix and a bunch of my keys will not work. Everything except the numbers and letters will not work. Last night when I was using WORD I got a prompt about sticky keys and filterkeys and something else. I changed a setting and now I have no idea what I did and cannot use my space bar, enter key, delete etc. while in WORD. Pls help.
Hi , Welcome to the HP Forums! It is a superb place to find answers and suggestions!
For you to have the best experience in the HP forum I would like to direct your attention to the HP Forums Guide. Learn How to Post and More How Do I Find My Model Number or Product Number? I understand that your keyboard is not functioning correctly. I am not sure what your exact model of notebook is, as when I did a search I got multiple results. Here is a link to HP Notebook PCs - Notebook Keyboard Troubleshooting (Windows 7). If that has not helped, you can try a restore back to when it was working correctly.HP PCs - Using Microsoft System Restore (Windows 7) You could also try restoring the original keyboard driver from the recovery manger.HP PCs - Using Recovery Manager to Restore Software and Drivers (Windows 7) Next would be to do a full recovery back to factory.HP PCs - Performing an HP system recovery (Windows 7) You will have an option to backup your personal files during the recovery. If you have not done one yet, now is a good time.HP PCs - Restoring Files that were Backed Up Using HP Recovery Manager (Windows 7) At any time you can opt to contact HP support for assistance. Please contact HP support at Contact HP Support To say thanks for responding please click the thumbs up icon below. If this resolved your difficulty please tell people by choosing solution provided. Good Luck! -
Values from event and from bindings are not same in valueChangeListener
Hi, in a valueChangeListener method of an af:selectOneChoice component I get
the new value from the event with:
valueChangeEvent.getNewValue()
and from bindings with:
JsfUtils.getExpressionValue("#{bindings.Parflag.inputValue}")
But the value from bindings is the previous value set in UI.
Why is this happening? In ADF Page lifecycle manual it is referenced that “update model values” face runs before “invoke application” so why the value in bindings is the previous value?
Any comment will be helpful,
Thanks.That’s right.
Could anyone comment why a valueChangeListener is regarder as a
Validation Process and not an Application Action that commits business changes.
I mean if I need a validator I can put an f:validator to the component and that’s all.
The immediate attribute didn’t change the result, the method is run before bindings set.
Maybe you are looking for
-
Ipod nano not showing in windows or iTunes
I've just purchased a new 7th. gen Nano. I have a windows 7 laptop with iTunes 11.1.5.5 that is working fine with an ipod clasic. When I plug the nano in it doesn't show up in itunes or windows file manager. The only place I can see it is under Devi
-
How to send a KeyEvent to an input method
Hello i am feeling a little bit lost at the moment. For an application i need to send key events to a text field (just like a normal keyboard). But if i i try to send KeyEvent's nothing happens with an enabled IM. Do i understand it correct that i ha
-
R&R Backup (Image) on two external USB drives
Hi Forum, in the early BIOS state of my T500 and working with Vista I had to rebuild my system several times due to OS failures. For that reason I periodically run R&R and make images on an external USB drive. Since I'm traveling very much I always h
-
Gv$active_session_history and v$active_session_history
Hi, What are the differences between these two views? gv$ vs v$? I did not found this information while google-ing Thanks
-
I bought an audiobook in itunes on my pc and I can not get it to push to my iphones. Do I physically have to connect to itunes to get the audiobook on my iphone?