To All
I am writing a MS Sql Server Select statement and I need to use the Sql Substring() function .. Consifer this code as the first statement works, however the second does not due to the variable substitution ..
Any advice would be greatly appreciated.
Rick Lipkin
I am writing a MS Sql Server Select statement and I need to use the Sql Substring() function .. Consifer this code as the first statement works, however the second does not due to the variable substitution ..
Any advice would be greatly appreciated.
Rick Lipkin
cSQL := "Select * from [Coproposal] where Substring(CINumber,1,3 ) = '"+ltrim(str(nProj))+".' Order by CINumber" // works cinumber = '27.'nLen := 3
cSQL := "Select * from [Coproposal] where Substring(CINumber,1,nLen ) = '"+ltrim(str(nProj))+".' Order by CINumber" // fails '27.' cinumber = '27.'