假设我有一个SQL表,其中一列的行中有一系列数字相互跟随,我想查找该序列是否出现在表中的其他位置。是否可以创建这样的查询?
表A
所以我需要找到这些数字在同一行序列中的其他位置并找到这些行。这在SQL中可行吗?我从Excel中提取文件,因为我无法在Excel中找到方法。
谢谢大师:)
答案 0 :(得分:0)
concat适用于sql-server
1. concat these 3 number to a string
2. concat next 3 numbers to a string
3. compare these 2 strings
4. if equel then you have it!
do it in a loop