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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Can I Make Mid(string,3,5) Work

Status
Not open for further replies.

leoliang

Programmer
Dec 9, 2003
27
0
0
CN
HI
I AM RUNNING A SQL STATEMENT SHOWN BELOW, BUT MY DRIVER DOESNT KNOW HOW TO DEAL WITH IT? ANYONE KNOW HOW I CAN SOLVE THIS PROLEM?
THANKS A LOT

sql is :
select id, desc from item where mid(desc,3) = 'sss'

my driver is:
merant 3.70 32-bit progress

the error message is:
Microsoft OLE DB Provider for ODBC Driverserror '80040e14'[MERANT][ODBC PROGRESS driver][PROGRESS]** Unable to understand after -- "item where mid". (247)
 
Try using the INSTR function. Something like this might do the trick:
Code:
SELECT id, desc FROM item WHERE INSTR(desc,'sss') > 0.
 
Or you could use wildcards:

Code:
SELECT id, desc FROM item WHERE desc LIKE '__sss%'.
 
Try the SUBSTR function:

select id, desc from item where substr(desc,3,5) = 'sss'

Ronnie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top