Mysterious behaviour of Oracle SQL [message #599014] |
Mon, 21 October 2013 07:40 |
|
bowie1304
Messages: 6 Registered: October 2013 Location: Germany
|
Junior Member |
|
|
Hallo All,
Perhaps you may have an Idea what is happening here.
The following sql statemenst are delivering different results:
select * from TABLE1
where nvl(value1,0) = 12485.83
and VALUE2 = 'CN'
-- and VALUE3 = '000000123456'
;
select * from TABLE1
where nvl(value1,0) = 12485.83
and VALUE2 = 'CN'
and VALUE3 = '000000123456'
;
we are expecting the same values in all fields defined for a record depening on the criteria, but what a surprise. In some fields, not all, there are values which are belong to values out of a record belonging to another Value3 defined select.
This problem is reproducable. We don't have any Idea what is happening here. The table is in the working area and compressed, maybe this is a problem but we don't know. Is there anybody else who has had a similar event.
Please help.
Kind regards
Willi
[Updated on: Mon, 21 October 2013 07:41] Report message to a moderator
|
|
|
|
|
Re: Mysterious behaviour of Oracle SQL [message #599028 is a reply to message #599025] |
Mon, 21 October 2013 08:27 |
Roachcoach
Messages: 1576 Registered: May 2010 Location: UK
|
Senior Member |
|
|
I may be reading ti wrong, but it still sounds like a non-oracle issue, that you have a logical issue with the application layer.
Can you replicate the issue with anonymized test data?
It doesnt sound like there's any issue with the select statement logic above but the data in the table itself which is something of a different question.
|
|
|
|
|
|
|
Re: Mysterious behaviour of Oracle SQL [message #599073 is a reply to message #599062] |
Tue, 22 October 2013 01:37 |
Roachcoach
Messages: 1576 Registered: May 2010 Location: UK
|
Senior Member |
|
|
bowie1304 wrote on Tue, 22 October 2013 06:58
What do you need as testcase, because this data are confidential. So my only chance is that you tell me what you need as testcase and I will try to present it in a reproducable way.
DDL for tables which can have masked data inserted into and those insert statements.
We dont need the exact data you have - but a sample set of obfuscated or unrelated data which returns the same problems when you run code against it.
I assume the column names aren't confidential, but even if they are mask those too.
So if in the real world you have:
create table foo
(secret1 varchar2(50)
,secret2 number);
Just alter it to
create table nofoo
(notsecret1 varchar2(50)
,notsecret2 number);
Or something like that. The principles same with the data.
We dont need the real data, we need dummy data that manifests the issue in the same way - that way we can properly help.
|
|
|
|
|
Re: Mysterious behaviour of Oracle SQL [message #599242 is a reply to message #599036] |
Wed, 23 October 2013 03:48 |
|
bowie1304
Messages: 6 Registered: October 2013 Location: Germany
|
Junior Member |
|
|
Hi All,
Thanks for your assistance at all. The problem has been solved, and it could be reproduced.
The Data we are looking at, where placed in a compressed working table with an index on it.
We analyzed our processing and found that the data where "corruped" just in the moment where there are insert and/or update statements, mostly updates.
After this update process step the data did show the phenomen. Google and reading oracle documentation brings up that in 10G, compressed tables with index on it may not work properly.
We set up our testenvironement with a non compressed table and monitored the process from start to beginning.
With uncompressed table all data are now ok.
It was my first Idea and it was right.
Thanks all.
[Updated on: Wed, 23 October 2013 03:50] Report message to a moderator
|
|
|