SQL中如何使用Left(,i),i为变量
mKey=right(Me.TreeView.SelectedItem.Key,Len(Me.TreeView.SelectedItem.Key)-2)i=Val(Len...
mKey = right(Me.TreeView.SelectedItem.Key, Len(Me.TreeView.SelectedItem.Key) - 2)
i = Val(Len(mKey))
rec.Open "select * from ly_Merchandise where left(mClassID,i) = '" & mKey & "'", con, 1, 1
left(mClassID, i )这里报错,如left(mClassID, 6 )可通过 展开
i = Val(Len(mKey))
rec.Open "select * from ly_Merchandise where left(mClassID,i) = '" & mKey & "'", con, 1, 1
left(mClassID, i )这里报错,如left(mClassID, 6 )可通过 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询