Hello,
I have a SQL that I want to send from VB6 to an SQL Server Database.
Before I was using an Access ddbb, and I had something like:
IIf(InStr([Name],"/"<>0 And InStr(InStr([Name],"/"+1,[Name],"/"<>0 ,
Mid([Name],InStr([Name],"/"+1,InStr(InStr([Name],"/"+1, [Name],"/"-InStr([Name],"/"-1),0) AS FirstName
That is, I find the position of the first ocurrence of "/" withing the value of the name and then take a number of caracters between the first "/" and the second "/".
The question is: How can I find a string (i.e. "/" with SQL Server ?
I want to find the position of the first "/" and then
I would use SUBSTRING to get the caracters.
Sorry if it was a too long explanation.
Many thanks!
imendi
I have a SQL that I want to send from VB6 to an SQL Server Database.
Before I was using an Access ddbb, and I had something like:
IIf(InStr([Name],"/"<>0 And InStr(InStr([Name],"/"+1,[Name],"/"<>0 ,
Mid([Name],InStr([Name],"/"+1,InStr(InStr([Name],"/"+1, [Name],"/"-InStr([Name],"/"-1),0) AS FirstName
That is, I find the position of the first ocurrence of "/" withing the value of the name and then take a number of caracters between the first "/" and the second "/".
The question is: How can I find a string (i.e. "/" with SQL Server ?
I want to find the position of the first "/" and then
I would use SUBSTRING to get the caracters.
Sorry if it was a too long explanation.
Many thanks!
imendi