SQL 或 ms-access 格式有一个这样的表。
样本
ID ID2 name class example
1 10 John main
2 10
3 10
4 10 ~ is look at me.
5 20 Candice main
6 20
7 20 ~ is in Japan.
8 20 ~ is reading a book.
9 20
我需要将示例字段(A)中的“~”替换为与 A 具有相同 ID2 且 class =“main”的名称字段的值。如何制作连接语法?
结果
ID ID2 name class example
1 10 John main
2 10
3 10
4 10 John is look at me.
5 20 Candice main
6 20
7 20 Candice is in Japan.
8 20 Candice is reading a book.
9 20