[英]Join two tables on different columns, where one column has the same data but inside quotations
我想对两个表之间存在的某些数据进行联接。 每个表都有数据,但是在不同的列中,其中一个表的数据用双引号引起来。 例如,表1的列
TABLE1
-----------
RefID | Name
--------------
DR111 | John
TABLE2
----------
DecID| #
--------------
"DR111" | 12345
如何忽略双引号将DR111上的两个表连接在一起?
您应该修复数据! 但是,如果您不能:
select . . .
from table1 t1 join
table2 t2
on t2.decid = '"' || t1.recid || '"'
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.