| Finns det personer som har olika information i FLYTT och BOFRS när FLYTT:FLYTTNR är samma som BOFRS:FLYTTNRTIL? |
with temp_flytt as (
select ddbid,flyttnr,tildat,tilfrs
from k137.flytt
)
,temp_bofrs as (
select ddbid,flyttnrtil,bobdat,bofrs
from k137.bofrs
)
select count(*) from temp_flytt a
join temp_bofrs b on a.ddbid=b.ddbid and a.flyttnr = b.flyttnrtil
where a.tildat != b.bobdat
or a.tilfrs != b.bofrs
|
0 |
|
| Finns det personer som har olika information i FLYTT och BOFRS när FLYTT:FLYTTNR är samma som BOFRS:FLYTTNRFRN? |
with temp_flytt as (
select ddbid,flyttnr,frndat,frnfrs
from k137.flytt
)
,temp_bofrs as (
select ddbid,flyttnrfrn,bosdat,bofrs
from k137.bofrs
)
select count(*) from temp_flytt a
join temp_bofrs b on a.ddbid=b.ddbid and a.flyttnr = b.flyttnrfrn
where a.frndat != b.bosdat
or a.frnfrs != b.bofrs
|
0 |
|