Hey guys, I don't want to waste too much time in my first "big" example. I 
need to transform a simple query from MySQL into OrientDB query.

Homefully someone of you could quickly help me. Otherwhise I need to spend 
some time testing, that's ok. Alright (btw I neutralized the names):

SELECT ipc1.id
FROM ( 
  SELECT ipc.id 
  FROM table1 ipc 
  WHERE ipc.symbol REGEXP '(^[[:<:]]B62D   6[[:>:]]*)' 
  LIMIT 0, 100 
) AS ipc1 
  JOIN ( 
  SELECT ipc.id
  FROM table1 ipc 
  WHERE ipc.symbol REGEXP '(^[[:<:]]B60[[:>:]]*)' 
  ) AS ipc2 
  ON ipc1.id = ipc2.id

Just in my minds I would do something like:

SELECT id FROM Application WHERE (SELECT symbol MATCHES '(^[[:<:]]B62D 
6[[:>:]]*)') AND WHERE (SELECT symbol MATCHES '(^[[:<:]]B60[[:>:]]*)') 

Application is the new class btw. If I test this I just get:

com.orientechnologies.orient.core.sql.OCommandSQLParsingException: Error on 
parsing command at position #111: Invalid keyword 'SELECT' Command: SELECT 
id FROM Application WHERE (SELECT symbol MATCHES '(^[[:<:]]B62D 
6[[:>:]]*)') AND WHERE (SELECT symbol MATCHES '(^[[:<:]]B60[[:>:]]*)') 
-----------------------------------------------------------------------------------------------------------------------^

Ohh and please don't say I should merge both id's. Maybe that's a good way 
for later on or so. But for now let's take it easy and just transform the 
query =) Thanks.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"OrientDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to