Skip to content

SQL: ORDER BY clause is invalid. #57

@nmpetkov

Description

@nmpetkov

ℹ Computer information

  • VFP version: VFP9 SP2
  • GoFish version: 6.0 (last)
  • Last GoFish version w/o bug (if available): bug is in everyone version I know

📝 Provide detailed reproduction steps (if any)

  1. Start GoFish
  2. Search

✔️ Expected result

See the result witout errors

❌ Actual result

Error:
SQL: ORDER BY clause is invalid.

I fix the error by finding the command in the gf_resultsform form:
Select *;
From (m.lcSearchEngineResultsAlias);
Into Cursor gf_temp_csr Readwrite;
Order By &lcOrderBy

and before it I put these 2 lines:
lcOrderBy = STRTRAN(m.lcOrderBy, 'PROCCODE ASC,', '', 1, 1)
lcOrderBy = STRTRAN(m.lcOrderBy, 'PROCCODE DESC,', '', 1, 1)
`
The reason for the error is that VFP does not allow sorting by memo field. I guess there is a better way to eliminate the problem, but this works for me anyway.

Hope this helps to fix this nasty bug.

📷 Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions