MySQL Forums
Forum List  »  Sybase

SQL statment from Sybase SqlAnywhere 11 to MySql
Posted by: Alex Declent
Date: July 08, 2010 12:56PM

Is there a possibility to convert these SQL statment from Sybase to mySQL.

update PERSON_GROUP, PERSON_TO_DEPARTMENT
set fk_person_group =
(
select id from PERSON_CODE as t1 where
IMP_PERSON_TO_DEPARTMENT.dep_code is not null and
t1.per_code = IMP_PERSON_TO_DEPARTMENT.dep_code
)
where
IMP_PERSON_TO_DEPARTMENT.dep_code is not null
and PERSON_CODE.per_code = IMP_PERSON_TO_DEPARTMENT.per_code;

I have tried it with temporary tables and much more, but I'm ended with the error: Subquery returns more the one row.

best regards, Alex

Options: ReplyQuote


Subject
Views
Written By
Posted
SQL statment from Sybase SqlAnywhere 11 to MySql
6247
July 08, 2010 12:56PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.