-2

I have simply two columns. In column A, series of 8000 rows like the following example:

A230399

A230405

A230407

A230418

A230827

A233273

A234868

A234905

A234907

In Column B, a series of Data Like the below:

SP120035_SDP3_Phase4 - 54685

SP120035_SDP3_Phase4 - 54860

Talk_Jan_FA

SP120035_SDP3_Phase4 - 54862

SP120035_SDP3_Phase4 - 54865

SP120035_SDP3_Phase4 - 54995

A230405-19542 - Samsung_STMS

A230412-19542 - Samsung_STMS

A233273-19542 - Samsung_STMS

As you can see, Only the Bolded texts in column A exists in column B. For the rows the colmun A rows, I want to highlight those rows that their Dara exists in column B. Would appreciate your Help!

4

1 回答 1

0

这应该只带回具有相同值的 tableB 开头的 tableA 记录

select tableA.* 
from tableA inner join tableB on (tableA.col1 = substring(tableB.col1,1,7))
于 2013-09-28T13:12:37.097 回答