Link to home
Start Free TrialLog in
Avatar of Murray Brown
Murray BrownFlag for United Kingdom of Great Britain and Northern Ireland

asked on

VB.net SQL Instr Function

Hi

I am trying to run the following query against a SQL database in my VB.net app but am getting an error that
the Instr function is not recognized

Select Distinct [CustomerID] From [CHILDREN] Where Instr([Child Name],'Jayden') > 0
Avatar of Russell Fox
Russell Fox
Flag of United States of America image

SQL uses CHARINDEX:
Select Distinct [CustomerID] From [CHILDREN] Where CHARINDEX('Jayden', [Child Name]) > 0

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Russell Fox
Russell Fox
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Murray Brown

ASKER

Thanks very much