1

起初我有这个代码添加前缀:

Dim sSQL As String
sSQL = ("UPDATE `" + cboJob.Text + "` SET `Line Number` = CONCAT('a',`Line Number`) WHERE `Line Number` LIKE '%-%'")
MyDB.ExecQuery(sSQL, "wellsfargo")

现在我的问题是如何删除我之前添加的前缀“a”

4

2 回答 2

5
 UPDATE your_table
 SET `Line Number` = substring(`Line Number`, 2)
 WHERE `Line Number` LIKE 'a%-%'
于 2012-12-27T11:59:12.493 回答
0

我想你想要这个:

Dim sSQL As String
sSQL = ("UPDATE `" + cboJob.Text + "` SET `Line Number` = `Line Number` WHERE `Line Number` LIKE '%-%'")
MyDB.ExecQuery(sSQL, "wellsfargo")

我已经删除了以“a”为前缀的 CONCAT 到行号

于 2012-12-27T11:51:07.553 回答