MySQL Forums
Forum List  »  MySQL Shell

correct the code
Posted by: Mohamed Ahmed
Date: September 18, 2022 04:02AM

Hello ,

I have a linked server from MSQLserver to MYsql database .

I need to correct the following transact sql code as I am querying the MySQL database.

select * from openquery(DRUPAL,'select o.* from (select max(vid), nid from content_type_irb_application_form group by nid) i inner join content_type_irb_application_form o on o.nid = i.nid and o.vid = i.vid')

I am getting the error :

Msg 7321, Level 16, State 2, Line 1
An error occurred while preparing the query "select o.* from (select max(vid), nid from content_type_irb_application_form group by nid) i inner join content_type_irb_application_form o on o.nid = i.nid and o.vid = i.vid" for execution against OLE DB provider "MSDASQL" for linked server "DRUPAL".

Options: ReplyQuote


Subject
Views
Written By
Posted
correct the code
71
September 18, 2022 04:02AM


Sorry, only registered users may post in this forum.

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.