[英]Teradata SQL- Split a string and search for that combination in respective fields
I have a set of fixed length strings in excel. 我在Excel中有一组固定长度的字符串。 How to split the string and provide the condition in
WHERE
clause? 如何在
WHERE
子句中拆分字符串并提供条件? I mean 我的意思是
eg: P0025583740005, P0025583740002, P0068377440009, P0067264370006.... the last four digits are the PIN number and the rest is the Claim number. 例如:P0025583740005,P0025583740002,P0068377440009,P0067264370006 ....最后四位数字是PIN码,其余数字是理赔号码。 Claim Number - P002558374;
索赔编号-P002558374; PIN - 0005
PIN-0005
while I'm searching for these in teradata
sql, I'm manually splitting the values like 当我在
teradata
sql中搜索这些时,我正在手动拆分诸如
SELECT * from myTable
where (Claim_nbr = 'P002558374' and PIN='0005')
OR (Claim_nbr = 'P002558374' and PIN='0002')
Is there a better way to do this? 有一个更好的方法吗?
SELECT * from myTable
WHERE Claim_nbr || PIN IN ('P0025583740005', 'P0025583740002', ...)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.