[英]Teradata SQL- Split a string and search for that combination in respective fields
我在Excel中有一組固定長度的字符串。 如何在WHERE
子句中拆分字符串並提供條件? 我的意思是
例如:P0025583740005,P0025583740002,P0068377440009,P0067264370006 ....最后四位數字是PIN碼,其余數字是理賠號碼。 索賠編號-P002558374; PIN-0005
當我在teradata
sql中搜索這些時,我正在手動拆分諸如
SELECT * from myTable
where (Claim_nbr = 'P002558374' and PIN='0005')
OR (Claim_nbr = 'P002558374' and PIN='0002')
有一個更好的方法嗎?
SELECT * from myTable
WHERE Claim_nbr || PIN IN ('P0025583740005', 'P0025583740002', ...)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.