Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9164

Can a table become corrupt?

$
0
0

Hi experts,

 

I'm having this bizarre problem with a very simple join on BSEG.  When I'm joining a very small subset of data to another of our tables I'm getting NULL values even though the join is clearly correct and I can see values in both tables I'm joining.  If I take BSEG and make a copy of the table definition and copy all of the data into my new copied table and switch my join to point to the COPIED version of BSEG everything works great.  So same EXACT data in each table yet the join doesn't work in the original.  Since clearly the data is the same in each table I was wondering if there's some sort of corruption happening in the original.  I tried to unload from memory and I've tried merge deltas with no success.  Then I started wondering what, if anything, could be corrupt.  Is it possible for their compression values to become corrupt for example?  Are there other secret indices somewhere that I'm not seeing that could be corrupt?

 

Example of code that returns nulls from MYZTABLE:

 

select B.BUKRS, B.BELNR, C.FUNC_CURR_TYPE from "MYSCHEMA"."BSEG" B LEFT JOIN

"MYSCHEMA"."MYZTABLE" C on B.BUKRS = C.BUKRS and B.MANDT = C.MANDT

where B.BELNR = '1234567890'

 

Example of code that works and returns matches from MYZTABLE:

(same code except points to a COPY of original bseg, called BSEGCOPY.  Same exact data in this table, and MYZTABLE is same exact table untouched.)

 

select B.BUKRS, B.BELNR, C.FUNC_CURR_TYPE from "MYSCHEMA"."BSEGCOPY" B LEFT JOIN

"MYSCHEMA"."MYZTABLE" C on B.BUKRS = C.BUKRS and B.MANDT = C.MANDT

where B.BELNR = '1234567890'

 

Any theories on what types of things could be wrong or possibly corrupt in my BSEG table?  Since data is the same in BSEG vs BSEGCOPY could there be some sort of decompression problem with BSEG that is not occuring in my BSEGCOPY for example?   Also note: in my JOIN ON condition these fields are exactly the same data types in both tables being joined. 

 

Thanks,

-Patrick


Viewing all articles
Browse latest Browse all 9164

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>