Question

Using Advantage Database Server 8.1 I am having trouble executing a successful query. I am trying to do the following

SELECT * FROM Persons
WHERE LastName IN ('Hansen','Pettersen')

To check for multiple values in a column. But I get an error when I try to execute this query in Advantage.

Edit - Error

poQuery: Error 7200: AQE Error: State = 42000; NativeError = 2115; [iAnywhere Solutions][Advantage SQL Engine]Expected lexical element not found: ( There was a problem parsing the WHERE clause in your SELECT statement. -- Location of error in the SQL statement is: 46

And here is the SQL i'm executing

 select * from "Pat Visit" where 
DIAG1 IN = ('43644', '43645', '43770', '43771', '43772', '43773', '43774', 
'43842', '43843', '43845', '43846', '43847', '43848', '97804', '98961', 
'98962', '99078')

Done

Does anyone have any Idea how I could do something similar in advantage that would be efficient as well?

Thanks

Was it helpful?

Solution

You have an extraneous = in the statement after the IN. It should be:

select * from "Pat Visit" where 
     DIAG1 IN ('43644', '43645', <snip> )
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top