I have a list of numbers that I keep in a table named A. I want to search these numbers in another table named K. In this table named K, I am trying to search a column that is named PAR and this column contains values like A and also other values that contains characters and numbers.
For example;
my table A has a number:
12312312312
Table K column PAR has something like
#NUM=12312312312#NA=45453#085937.....
table A contains 20k data. I am trying to find if table K column PAR includes that 20k values. How can I do that?
I use TOAD and ORACLE SQL. I don't have grant to use PL/SQL. Thanks!
Here's one option, which splits
parinto rows (that contain numeric values only) and joins that subquery results withatable'snumcolumn (with theto_charfunction applied to it, to avoid implicit datatype conversion and false positive results).Sample data:
Query:
P.S. You said
There's no such grant. You might not be granted to create PL/SQL named program units (functions, procedures, triggers, packages), but you certainly can create an anonymous PL/SQL block.