Fetch problem
We have two instance (SIDs) in our DB . We have a stored
procedure , which fetchs cursor into variables. In first DB it
works( fetchs data) and in another - it doesn't work ( the data
are the same as they are in the first one). Server is
NTServer,Oracle7.3.3 What the problem could be?
null
Why don't you use this only?
satyaki>
satyaki>declare
2 cursor c1(eno in number)
3 is
4 select *
5 from emp
6 where empno = eno;
7
8 r1 c1%rowtype;
9 begin
10 open c1(7777);
11 loop
12 fetch c1 into r1;
13 exit when c1%notfound;
14 dbms_output.put_line(r1.ename);
15 end loop;
16 close c1;
17 end;
18 /
SOURAV
PL/SQL procedure successfully completed.
Elapsed: 00:00:02.87
satyaki>
satyaki>Regards.
Satyaki De.
Similar Messages
-
Data fetch problem from EBAN table
Hi All,
I have a problem in data fetching. My SQL statement is
SELECT A~BANFN
A~FRGDT
A~MATNR
A~MENGE
A~MEINS
A~AFNAM
A~EKGRP
A~PRIO_URG
A~STATU
A~RLWRT
A~EBELN
A~LOEKZ
A~EBELP
A~FRGKZ
INTO CORRESPONDING FIELDS OF TABLE ITAB_DATA
FROM EBAN AS A
WHERE A~STATU IN S_STATU
AND A~EKGRP = S_EKGRP
AND A~BANPR = '05'
AND AFNAM IN P_AFNAM
AND BEDNR IN P_BEDNR .
In EBAN table data in AFNAM field is like 'Mech', 'mech' & 'Mech'
Now in selection screen if user give Mech then system picks only that data where 'Mech' is there but requirement is it should pick all data related to ('Mech', 'mech', 'Mech') in AFNAM field. How do I do?
Thanks and regards,
Rajesh VasudevaHello,
What you ask is not easy but it is feasible.
We had the same request to make a case-insensitive search on a text field.
As a reference for our development we took the following example:
[http://wiki.sdn.sap.com/wiki/display/Snippets/CaseInsensitiveSearchHelpExitforMaterialGroup|http://wiki.sdn.sap.com/wiki/display/Snippets/CaseInsensitiveSearchHelpExitforMaterialGroup]
In short : the purpose is that first of all you build up a list of all possible values in a separate internal table.
Then use this separate internal table in the FOR ALL ENTRIES clause when you perform the select on the actual data.
Success.
Wim -
Gmail fetch problem and something else
Hi,
I have set up on my iphone ver 2.2 the gmail imap acount through the iphone.
Fetch is set to 30 mins, i've disabled push bcz gmail does not support push anyway (apart from android so they say) and to reduce battery use.
Two issues I can't seem to solve:
My phone does not fetch while in sleep, if I dont touch it for more than 30 mins, I open it and it shows last updated in a time more than 30 mins. sometimes even 2 hours and no fetching.
Other thing - that may be the cause: when i wake up the phone from sleep - unlocking it, and going to the gmail and pressing update manually (due to the problem i described before) the iphone cant connect to the wifi on first time and gives me msg regarding unable to connect to 3G (I've disabled that throgh the iphone option and through my cellular company - I dont have a data plan).
After getting those cant connect to 3G msg's i press again and then it connects and download the emails - if there are new ones.
I have a wireless router that i configured with my iphone - safari doesn't seem to have problem connecting from sleep right away.
Any suggestions?
Thanks,
NitayHi,
I can already state that the problem still exits, I already got the message 'no cellular data available...' followed by 'cannot connect to smtp.gmail...
Which I think it may be the issue causing the problem of periodically fetch. (Since it can't connect to the server for some reason).
Any ideas?
Thank again -
I had a problem in using OCIStmtFetch
I wrote a class to realize the "select", but facing a problem, that is
A table have many fiels, an attribute of one of the fields was null,
I did the OCIStmtFetch (trying to select the field), I want to get the record whose field was null,but the record of that field (is null) and all the following records cannot to be got(read out).
connectiong and all the enviorment are ok, and no eroor was reported during the compiling and executing.
Thanks>
I have one query with results that needs to be reused in several parts of my website. I can't seem to find the equivalent of the mysql_data_seek in Oracle. I wanted to reset the cursor/pointer of oci_fetch($result) so that I can scroll the result again.
So far this are what I have come up:
A. On first fetch put the the results in a php array and call the array later on.
B. Do the query again.
C. Keep on looking for a mysql_data_seek equivalent and fail.
I'm leaning towards option 'A' but I just wanted to consult the experts.
>
If option A works for you then use it. Oracle has no equivalent to mysql_data_seek.
The option to use depends on your business requirements. If you know you want exactly the same results you will have to cache the original results. If you redo the query you are NOT guaranteed to get the same results or even the same number of rows.
Someone could have inserted/deleted/updated rows after you began your first query. Then when you do your second query you would get different results. This means that if you query for the first 100 records a second query to get the next 100 may return some of the same records your first query retrieved and even those 'same' records (based on primary key) may be different if they have been updated. -
Data fetching problem in internal table
Hi All,
I have two internal table which are of type as shown below.
itab1 is of following type:
regno(255) type c,
uid type c
itab2 is of following type
regno type regno,
uid type userid,
address type add,
phno type phn.
Datas in itab2 are as follows:
100 01 india 3454534
200 01 china 34553543
300 02 us 6464654
400 02 uk 45654
Itab1 is populated using the uid field as key as shown below.
regno uid
100 200 01
300 400 02
100 200 are values in field regno
01 is uid.
What we have done is collected all the regno which belong to the same uid for sending a single mail to the uid person with both the regno. We are able to achieve this. For this finally we loop into itab1 and fetch the uid and send mail to him.
Now an extra requirement is to send the details of a regno (address and phno) along with the mail. The prob is in our final internal table we have a character field which will have all the regno for a uid (may be upto 20). Each regno will be of length 3.
I have to loop into tab1 and read tab2 to achieve this using uid as key. But regno will for a uid will be combined. I have fetch each regno say 100 first and get the details and then 200 and then get the details and send a mail to uid 01. Then 300 and 400 details and then a mail to uid 02.
Please explain how to get individual regno when i loop into tab1 and read tab2 so that i can fetch the details.
Any suggestion will be very helpfulHi Aslam,
As per my understanding...
In itab1, instead of maintaining all the reg no in the same field(like 100 200 300 ....) againist uid 01
maintain multiple records like
regno udi
100 01
200 01
300 01 etc
(in this case the combination of regno & uid becomes the key.)
now while ur sending mail to the people, just loop the recors of itab1
in the same loop u can just write a read statement to get the remainig details(address, phone no etc..) of that regno from itab2.
Hope this helps you, revert back if still u hav any problm. -
Data fetching problem in select query
HI Expert,
Pls check the below code as data is not fetching due to BGMKOBJ-OBJNR(22) not equal to EQKT-EQUNR(18).
select EQUNR
EQKTX
from EQKT into corresponding fields of table IT_EQKT
from EQKT into table IT_EQKT
into table IT_EQKT
from EQKT
for all entries in IT_BGMKOBJ
for all entries in IT_ITOB
where EQUNR = IT_ITOB-OBJNR
and spras eq 'EN'.
Pls help me with code.
Thanks & Regards,
SinghaCreate a new internal table with the field EQUNR with BGMKOBJ-OBJNR values and do for all entries on this table.There is no alternative on this.
e.g,
types: begin of t_equnr,
equnr type EQKT-EQUNR,
end of t_equnr.
data : it_equnr type table of t_equnr,
wa_equnr type t_equnr.
loop at IT_BGMKOBJ into wa_BGMKOBJ .
wa_equnr-equnr = wa_BGMKOBJ-OBJNR.
append wa_equnr to it_equnr.
endloop.
select EQUNR
EQKTX
from EQKT into corresponding fields of table IT_EQKT
from EQKT into table IT_EQKT
into table IT_EQKT
from EQKT
for all entries in IT_BGMKOBJ
for all entries in it_equnr
where EQUNR = it_equnr-EQUNR -
Hi Guys,
I am extracting data from RSA7 to BW with delta update.
in RSA7 tcode I can see column Total is populated with some entries means it has records, when I tried to see these records
in Queue-> Display data entries->Update mode (Delta update) I don't see any records but when I used (Delta Repitition)
as a update mode I am able to see the records.
But when I am doing Delta update to BW it ends with 0 Records and RSA7 total column shows 0 entry.
What could be the problem?
Thanks & Regards
Deepak Chaavn.Hi
See
https://wiki.sdn.sap.com/wiki/display/profile/Surendra+Reddy
Checking the Data using Extractor Checker (RSA3) in ECC Delta Repeat Delta etc...
http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/80f4c455-1dc2-2c10-f187-d264838f21b5&overridelayout=true
Data Flow from LBWQ/SMQ1 to RSA7 in ECC and Delta Extraction in BI
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/business-intelligence/d-f/data%20flow%20from%20lbwq_smq1%20to%20rsa7%20in%20ecc%20and%20delta%20extraction%20in%20bi.pdf
Thanks
Reddy -
Still..Fetching Problem..Please Help
Hello! Below is the code snippets of my program to test the setFetchSize() method. When run, it still retrieves all the contents of the table. I just need to retrieve say 4 items per page. Please help. Thanks.
int skucd = 0;
String skudesc = "";
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con = DriverManager.getConnection("jdbc:odbc:dsShopCart", "", "");
Statement stmt = con.createStatement();
stmt.setFetchSize(4);
ResultSet rs = stmt.executeQuery("SELECT * FROM tblProduce");
while (rs.next())
skucd = rs.getInt("sku_code");
skudesc = rs.getString("sku_desc");
System.out.println("Sku Code-"+skucd +"/Desc-"+skudesc);Using Stqtement.setFetchSize() one can only provide the JDBC driver a hint as to how many records the driver code should actually fetch from the database whenever it has reason to fetch results physically from the database and the driver is free to ignore that hint as well.
However, the point to be noted in your case is that when a JDBC driver actually fetches results from the database depends on the specific driver implementation. For example, this may happen not only when one invokes Statement.executeQuery() etc but later on, for example when one invokes some method that performs some row operation on the result set. So, using setFetchSize() one can provide a hint to the driver as to how many records to physically fetch from the database whenever there is such a need to physically fetch from the databse.
As far as I know, one has to implement some kind of paging model over the results by onseself.
If you are involved with diaplaying results on an HTML page, tis might help http://jsptags.com/tags/navigation/pager -
LMS 4.1 Configuration Fetch Problem
Hello,
I have some problem with WS-C4006 Cisco Catalyst that lms doesn't collect and put into "never collected" area. I also see that those devices doesn't show the classic prompt ">" and "#". Could be the main problem ? If yes how can configure LMS to recognize a different prompt for devices.
If no what could be the problem ?
Many thanksYou can add your custom prompts into /opt/CSCOpx/objects/cmf/data/TacacsPrompts.ini. No restart of LMS is required for the addition to be recognized.
-
Hi All,
on one pc we are unable to export report. report is displaying but when we go list---> export GUI is hanged up.
and sap gets closed automatically. same report is working on another pc. thats why i m thinking its gui problem.
pls help.
rgds
Awnindra dutt Tiwaryhi
gui version is 710 i hav reinstalled it but getting same problem. my office is working properly.
rgs -
"Long fetch" problem with BLOBs
When I try to read BLOB fields from foreign database (Interbase) (in PL/SQL server code), I often got this error. After increasing HS_RPC_FETCH_SIZE and HS_LONG_PIECE_TRANSFER_SIZE it stops happening.
But in Forms when reading into Image item it still appears from time to time.
Any ideas what it depends from or how to solve this problem?No Ideas? May it perhaps be a restriction of db-admin?
-
Lazy fetching problem with TopLink essentials
[TopLink Warning]: 2008.08.02 08:56:14.656--ServerSession(29131495)--Ignoring LAZY fetch type on element [public byte[] org.mayhem.mail.entity.Message.getRawBytes()] within entity class [class org.mayhem.mail.entity.Message]. All basic mappings default to use EAGER fetching.This is what I get when I start TopLink essesntials based JavaEE server. Why is that ?
No, no..... I knooow that lazy fetching is not required to be supported by a JPA implementor.
The question is why ?
I mean, isnt Toplink the official implementation, and arent all features "supposed" to be implemented?
How can I address this issue ?
I dont want to fetch the bytes on each accessed message ...... ;(TopLink Essentials does not support this optional feature.
EclipseLink 1.0 does, (JPA 2.0 reference impl). EclipseLink is basically the full open sourcing of the TopLink product, where as TopLink Essentials only included "Essential" features.
-- James : [http://www.eclipselink.org] -
BLOB lazy fetch problem.. SOMEONE HELPS !
Well... Toplink essentials ignores the lazy fetch flag from my entity class. Why is that ?
Will toplink (non-essentials) ignore it ?
How can I deal with this issue ?lazy on Basic, (actually in general) is an option part of the JPA specification (a hint actually), so TopLink Essentials did not support lazy on Basic (only on relationships).
EclipseLink 1.0 does support this (as long as you use the weaving agent). It also supports fetch groups beyond the JPA specification.
A solution without lazy is to move the LOB into another object and define a lazy 1-1 to this object. This is normally a good idea with large LOBs in general, even with lazy support.
-- James : http://www.eclipselink.org -
Hi Experts,
Could you please anybody help me and resolve this issue
As per my below requirement i had written below select queries but this requirement says ATWRT is next retest date and manufacturer expiration date based on the values of AUSP-ATINN field.
But the values of ATWRT from the table AUSP are
1) CUST-N09.00602560
2) CUST-N11.00220820
3) CUST-N09.00602560 and so on..........
but how can i get above requirement as mentioned above dates .
<b>Material number (RESB-MATNR) material short text,( MAKT-MAKTX) quantity weighed (RESB-BDMNG), unit of measure (RESB-MEINS), next retest date (READ AUSP-ATWRT where batch equals AUSP-OBJEK and AUSP-ATINN equals LOBM_QNDAT), manufacturer expiration date(READ AUSP-ATWRT where batch equals AUSP-OBJEK and AUSP-ATINN equals LOBM_VFDAT), batch number.(RESB-CHARG).</b>
SELECT a~matnr
a~bdmng
a~meins
a~charg
a~aufpl
a~aplzl
a~objnr
b~maktx
INTO TABLE gt_resb_makt
FROM resb AS a INNER JOIN makt AS b
ON amatnr = bmatnr
WHERE a~objnr = wa_afvc-objnr
AND a~aufpl = wa_afvc-aufpl
AND a~aplzl = wa_afvc-aplzl.
IF gt_resb_makt[] IS NOT INITIAL.
SELECT objek
<b>atwrt</b>
atinn
FROM ausp
INTO TABLE gt_ausp
FOR ALL ENTRIES IN gt_resb_makt
WHERE objek = gt_resb_makt-charg
AND atinn = 9999999400.
SELECT objek
atwrt
atinn
FROM ausp
INTO TABLE gt_ausp1
FOR ALL ENTRIES IN gt_resb_makt
WHERE objek = gt_resb_makt-charg
AND atinn = 9999999409.
Regards,
DivyaHI Divya,
as per i understand...
try this method..
1. select objek from ausp itab where atinn = urs characteristic.
2. loop at itab.
select objeck from inob into itab1 where cuobj = itab-objek.
endloop.
inob-objek is a mix of matnr + batch.
matnr = itab1-objek+0(18).
batch = itab1-objek+18(10).
use these matnr and batch values in table RESB and get all other things as per ur requirement.
hope it helps.. let me know if u have other requirement.
Regards -
hi
i am fetching problem when i am storing two value in excel
when i put write to measurement filt.vi in for loop that time unnecessary data also came in it.
and while i am putting measurement filt.vi outside the for loop that time only last data save
i want to save two data in two collumn
so pleaze help
Solved!
Go to Solution.
Attachments:
Final Tushar1.vi 87 KBTry the attached example. Never build array for a long time it will lead to Out of memory error.
The best solution is the one you find it by yourself
Attachments:
File Cont Write.vi 38 KB
Maybe you are looking for
-
After resetting firefox, I can no longer search from the address bar
Like the title says I can't search from the address bar "awesome bar" anymore. I just get a 404 error when I try. Searching just lists tons of people getting the "just update keyword.url" answer that's no longer valid. And hasn't been for several yea
-
Tagged PDF files from ColdFusion.
Does anybody know about the current -- and maybe future -- capabilities of ColdFusion tools that generate PDF files, such as <cfreport...> and <cfdcoument...> tags, to create 'tagged' PDF files? Tagged PDF files are PDF documents that have structural
-
Hello, Whenever i create a PR directly from work order, can i set it status HELD first? I may want to review the PR before finally saving it. When i create PR from ME51N, i have the option to HOLD the PR before saving it. I don't get this with PR c
-
Attachment Keystroke Please?
Hi... I can't seem to find info anywhere that tells me how to add an attachment to an email by using a keystroke. I would rather do it this way than always having to hit the "add attachment" button. Thanks!
-
Trackpad gesture spaces switch turns screen gray
After upgrading my AirBook to Mountain Lion, I frequently have an issue where a single finger trackpad gesture to the left or right edge of my screen causes my entire screen to turn gray. The only way I've found to get my screen (and spaces) back is