Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mid() function in SQL, where clause 3

Status
Not open for further replies.

christer99

IS-IT--Management
Dec 3, 2001
247
What is the equivalent of a Mid() function in SQL? I need to get this to work.

WHERE Mid(dbo.INS.C, 209,3)='SL '

Obviously this doesn't work because there is no Mid function in SQL, how do I solve this problem? There must be another command?
 
Did you try the substring function?
Sample:
Code:
declare    @v_string varchar(20)
set        @v_string = 'getscriptname'
select     substring(@v_string, 4, 6)

Regards,
AA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top