code_junkie

How do I compare two glob values in Oracle

Nov 10th, 2011
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. select key, glob_value source_table
  2. minus
  3. select key, glob_value target_table
  4.  
  5. dbms_lob.compare(
  6. lob_1 IN BLOB,
  7. lob_2 IN BLOB,
  8. amount IN INTEGER := 18446744073709551615,
  9. offset_1 IN INTEGER := 1,
  10. offset_2 IN INTEGER := 1)
  11. RETURN INTEGER;
  12.  
  13. Select key, glob_value
  14. From source_table Left Join target_table
  15. On source_table.key = target_table.key
  16. Where target_table.glob_value is Null
  17. Or dbms_lob.compare(source_table.glob_value, target_table.glob_value) <> 0
  18.  
  19. select key, to_hash_str_val(glob_value) from source_table
  20. minus
  21. select key, to_hash_str_val(glob_value) from target_table
Add Comment
Please, Sign In to add comment