起初我有这个代码添加前缀:
Dim sSQL As String
sSQL = ("UPDATE `" + cboJob.Text + "` SET `Line Number` = CONCAT('a',`Line Number`) WHERE `Line Number` LIKE '%-%'")
MyDB.ExecQuery(sSQL, "wellsfargo")
现在我的问题是如何删除我之前添加的前缀“a”
UPDATE your_table
SET `Line Number` = substring(`Line Number`, 2)
WHERE `Line Number` LIKE 'a%-%'
我想你想要这个:
Dim sSQL As String
sSQL = ("UPDATE `" + cboJob.Text + "` SET `Line Number` = `Line Number` WHERE `Line Number` LIKE '%-%'")
MyDB.ExecQuery(sSQL, "wellsfargo")
我已经删除了以“a”为前缀的 CONCAT 到行号