Results 1 to 2 of 2

Thread: DB Access and SUBSTRING

  1. #1
    Laurent from France Guest

    DB Access and SUBSTRING

    I tried the following SQL Request:
    "SELECT DISTINCT SUBSTRING(Designation, 7, 2) FROM MyTable WHERE ..."
    I would retrieve a part of the designation field of my table.

    I have this following error:
    Warning: SQL error: [Microsoft][Pilote ODBC Microsoft Access 97] fonction 'SUBSTRING' not defined in expression in SQLExecDirect.

    I also tried SUBSTRING(Designation FROM 7 FOR 2), or used SUBSTR instead SUBSTRING: Same error occurs.
    It doesn't work.
    Does someone already had this problem and found a solution to resolv?
    Thanks for help.

  2. #2
    Laurent from France Guest

    DB Access and SUBSTRING (reply)

    I finally found!
    If someone has the same problem, try:
    SELECT mid(Designation ,17 ,8) AS PartDesign FROM MyTable WHERE...

    ------------
    Laurent from France at 9/21/01 5:56:50 AM

    I tried the following SQL Request:
    "SELECT DISTINCT SUBSTRING(Designation, 7, 2) FROM MyTable WHERE ..."
    I would retrieve a part of the designation field of my table.

    I have this following error:
    Warning: SQL error: [Microsoft][Pilote ODBC Microsoft Access 97] fonction 'SUBSTRING' not defined in expression in SQLExecDirect.

    I also tried SUBSTRING(Designation FROM 7 FOR 2), or used SUBSTR instead SUBSTRING: Same error occurs.
    It doesn't work.
    Does someone already had this problem and found a solution to resolv?
    Thanks for help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •