我有一个包含5列的表,例如:
f_id s_id t_id string date
1 2 3 aaa_C 15/03/2008 10:30:00
1 2 4 vvv_C 15/03/2008 10:30:00
1 2 4 sss_C 15/03/2008 20:00:00
1 2 3 xxx_B 15/03/2008 10:30:00
1 2 5 yay_B 15/03/2008 10:30:00
我正在尝试比较行以检查是否:
row1.f_id = row2.f_id = row3.f_id....and row1.s_id = row2.s_id = row3.s_id...
and row1.date = row2.date = row3.date..and row1.string like '%_samesuffix' and row2.string like '%_samesuffix'...
然后输出应如下所示:
f_id s_id t_id string date
1 2 3 C 15/03/2008 10:30:00
1 2 4 sss_C 15/03/2008 20:00:00
1 2 5 B 15/03/2008 10:30:00
如果有任何提示,我将不胜感激。