473,790 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Query behaving differently in different times

4 New Member
Hi Freinds,
We are facing a very strange problem. Our system consists of UNIX batches which call the PLSQL procedures to execute the validations on the database.
We have a list of plsql procedure names stored in a table with a column having a sequence in which they have to be executed.

The problem is that one of the procedure is working very differently. Some times when we execute the batch it gives the error on one record, and if we execute it again it processes the record successfully. We have recently upgraded to oracle 10g dont know if this is related to that, but its causing lots of confusion.

Has anyone experienced such a problem when a simple update behaves differently for the same data on different times.
plz help
Jun 14 '07 #1
4 1580
debasisdas
8,127 Recognized Expert Expert
Hi
vishwadeepsharm a
Welcome to TSDN.

You have reached the right place for knowledge shairing.

Here you will find a vast resource of related topics and code.

Feel free to post more doubts/questions in the forum.

But before that give a try from your side and if possible try to post what/how you have approached to solve the problem.

It will help Experts in the forum in solving/underestanding your problem in a better way.

Please follow the posting guidelines in every new post/reply.

Please specify your post/question clearly.

Dont expect others to guess and solve your problem.
Jun 14 '07 #2
debasisdas
8,127 Recognized Expert Expert
Is there any dependency of the base table with other tables.

It will never happen that the query will behaving differently in different times

There must be some error in your logic.
Jun 14 '07 #3
vishwadeepsharma
4 New Member
Is there any dependency of the base table with other tables.

It will never happen that the query will behaving differently in different times

There must be some error in your logic.
Debasis, below is the update

UPDATE wrk_tms_new_nap _trk wtnnt
SET wtnnt.msg_cd = i_Error_Cd,
wtnnt.msg_typ_c d = i_Error_Cat,
wtnnt.upd_dt = SYSDATE,
wtnnt.upd_user_ id = i_Prg_Nm,
wtnnt.chg_evnt_ typ_cd = 'U'
WHERE NOT EXISTS
(SELECT 1
FROM memberships mem,
partner_lyty_sc heme pls,
loyalty_program mes lp
WHERE mem.cid = wtnnt.cid
AND mem.lyty_prg_cd = lp.lyty_prg_cd
AND mem.curr_mbrp_s ts_cd = 'A'
AND lp.lyty_prg_typ _cd = 'F'
AND mem.curr_mbrp_s ts_start_dt <= TRUNC(SYSDATE)
AND pls.partner_cd = wtnnt.partner_c d
AND pls.lyty_scheme _cd = mem.lyty_prg_cd
AND pls.start_dt <= TRUNC(SYSDATE)
AND pls.end_dt >= TRUNC(SYSDATE)
)
AND wtnnt.msg_cd IS NULL
AND wtnnt.prg_nm = i_Prg_Nm
AND wtnnt.bch_no = i_Bch_No
AND wtnnt.set_cd = i_Set_Cd ;

the values are picked up from a file, and the select returns data when the records are checked later but the update still marks the error. Can you figure out some possible resons for this...thx
Jun 14 '07 #4
vishwadeepsharma
4 New Member
Debasis, below is the update

UPDATE wrk_tms_new_nap _trk wtnnt
SET wtnnt.msg_cd = i_Error_Cd,
wtnnt.msg_typ_c d = i_Error_Cat,
wtnnt.upd_dt = SYSDATE,
wtnnt.upd_user_ id = i_Prg_Nm,
wtnnt.chg_evnt_ typ_cd = 'U'
WHERE NOT EXISTS
(SELECT 1
FROM memberships mem,
partner_lyty_sc heme pls,
loyalty_program mes lp
WHERE mem.cid = wtnnt.cid
AND mem.lyty_prg_cd = lp.lyty_prg_cd
AND mem.curr_mbrp_s ts_cd = 'A'
AND lp.lyty_prg_typ _cd = 'F'
AND mem.curr_mbrp_s ts_start_dt <= TRUNC(SYSDATE)
AND pls.partner_cd = wtnnt.partner_c d
AND pls.lyty_scheme _cd = mem.lyty_prg_cd
AND pls.start_dt <= TRUNC(SYSDATE)
AND pls.end_dt >= TRUNC(SYSDATE)
)
AND wtnnt.msg_cd IS NULL
AND wtnnt.prg_nm = i_Prg_Nm
AND wtnnt.bch_no = i_Bch_No
AND wtnnt.set_cd = i_Set_Cd ;

the values are picked up from a file, and the select returns data when the records are checked later but the update still marks the error. Can you figure out some possible resons for this...thx
Is it possible that oracle is rewriting the query and writing it wrong.
Jun 14 '07 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
3700
by: Patchwork | last post by:
Hi Everyone, Please take a look at the following (simple and fun) program: //////////////////////////////////////////////////////////////////////////// ///////////// // Monster Munch, example program #include <list>
1
2844
by: Jamie Burns | last post by:
Hello, I am writing a search engine that uses mysql to keep a word index. I have just added the "position" of each word, in relation to the document it is in. My table thus is as follows: id | word | word_position | document_id
5
2156
by: amit kumar | last post by:
I am calling a function which returns pointer to a map. The declaration of the map is map<int,vectxyz*>. vectxyz is a vector containing pointer to a class xyz. For map<int,vectxyz*>* p1 In the called function, I am using p1->find(1) which is returning a valid iterator and not going to the end. I am returning p1 from the called function. But in the calling function, find(1) is going to the end, i.e unable to find the key 1, which was...
1
1642
by: JD | last post by:
I'm using MS Access 97 in an XP environment. I have an append query at the top of a query tree that is behaving strangely. From design view, I can choose view datasheet - and I see one set of results - results of numerical calculations I'm making. However, when I 'run' the query, appending the results into an empty table -- the results that I get are not the same as those I saw in datasheet view -- the numbers have changed! I see no...
2
1057
by: bingomanatee | last post by:
I have developed what amounts to a fancy shopping cart wizard for a scientific instrument using VB.NET. We are having some disturbing phenomena relating to dropdown controls. On my system and other XP based systems I can repopulate the dropdowns just fine, to reflect different system configurations. However one of our engineers is runnign Windows 2000 and he has noticed that the dropdowns are showing several blank lines. They are...
3
1370
by: Sam Durai | last post by:
Here is a small testcase of the problem which I'm facing in prod env. db2 =describe table tab1 Column Type Type name schema name Length Scale Null ------------------------------ --------- ------------------ -------- ----- ----
5
7238
by: jonceramic | last post by:
Hi All, I started developing in Access, and people took notice and so we're starting to migrate into our corporate's bigger Oracle system. I'll still be using my developed Access front ends, but will be migrating my back ends to Oracle ODBC. 1. Does anyone have recommendations for books or web resources for general rules/guidelines/help on doing this? I haven't found a good
8
8229
by: fel | last post by:
does anybody know of any *web* query builder in PHP, something like the Access query builder, or similar, done in PHP or similar? I've looked for it trough the net, but nothing is colse to what I need. I'm not looking forward to build my own,I hardly have any time. all I find is programmer tools, I need something a USER (that has a good understanding of the database schema, and some SQL knowledge) can use, not a phplib.
2
9843
by: existential.philosophy | last post by:
This is a new problem for me: I have some queries that open very slowly in design view. My benchmark query takes about 20 minutes to open in design view. That same query takes about 20 minutes to open in datasheet view. As an experiment, I deleted all rows in all tables; after that, the query took only seconds to open in both design view and datasheet view. From these facts, I conclude that Access is evaluating the query when I go to...
0
9666
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9512
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10413
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9986
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7530
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6769
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4094
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3707
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2909
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.