我在SQL中有两个表,我正在查找第三个表的参考号。我试图得到的是一种语法:
CASE
WHEN NUM (TABLE 1) = NAME THEN LEFT(NUM (TABLE 1),14)
WHEN NAME = ''UK'' THEN LEFT(NUM (TABLE 1),11)
**** WHEN LEFT(NUM (TABLE 1), 3) IS NOT NUMERIC THEN LOOK FOR NUM IN TABLE 2***
ELSE ACCGRPNUM
END AS ID,
我已插入此(表1)以显示两个表的起作用。
提前致谢