|
-
Aug 8th, 1999, 11:27 AM
#1
Thread Starter
Junior Member
In VB you can get characters form a specified place form a string with mid function. Is there a similar function in SQL?
thanks
Jamppa
-
Aug 9th, 1999, 12:03 AM
#2
Frenzied Member
Depends on the SQL. Transact-SQL (used by MS SQL Server) has a "charindex" function that appears to behave as "mid" does.
Standard SQL does not, I believe, have this ability.
-
Aug 9th, 1999, 12:25 AM
#3
New Member
The Mid function can be used embedded into your SQL query if using DAO and connecting to Access.
Using the following example would return all records where the name field contains the text 'ill' in character positions 2,3, and 4.
Data1.RecordSource = "Select * from MyTable Where Mid(Name,2,3) = 'ill'"
Data1.Refresh
So records with the name 'Bill' and 'Jill' would be returned. Don't forget you may also need to embed a UCASE to avoid case senstivity.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|