MySQL Forums
Forum List  »  Newbie

Need to convert MSSQL to MYSQL
Posted by: Vivek Up
Date: July 23, 2015 04:18AM

Hi,
I want to convert MSSQL (FOR XML Path) command in MYSQL format.
Please help to resolve this issue.

declare @ScreenModel_XML xml;
select @ScreenModel_XML =
(
select (select
(select AutomationObjectID as 'AutomationId',
[object].ScreenModel_ID 'ScreenId',
ObjectID 'ControlId',
ObjectName 'ControlName',
LogicalName 'LogicalName',
ClassName 'ClassName',
ControlType,
Framework,
InnerText,
InnerHtml,
OuterHtml,
ObjectVisible,
Custom,
IsFrame,
CSSSelector,
FrameID,
PageID,
ObjectHierarchy,IFrameIndex,ControlIdentifier,DelayCondition
from AutomationObject [object]
join ScreenModel ScreenModel on ScreenModel.ScreenModel_ID = [object].ScreenModel_ID
where [object].ScreenModel_ID=2-- @ScreenModel_ID
FOR XML AUTO, ELEMENTS, type) for xml path('ScreenModel')) as xmldata)
select @ScreenModel_XML

In MSSQL I am having the OUTput in below format...

AutomationId ScreenId ControlId ControlName LogicalName ClassName ControlType Framework InnerText InnerHtml OuterHtml ObjectVisible Custom IsFrame CSSSelector FrameID PageID ObjectHierarchy IFrameIndex ControlIdentifier DelayCondition
4 2 3 Button Login Button false

XML Format:

<ScreenModel>
<object><AutomationId>4</AutomationId><ScreenId>2</ScreenId><ControlId>3</ControlId><ControlName>Button</ControlName><LogicalName>Login</LogicalName><ClassName /><ControlType>Button</ControlType><Framework /><InnerText /><InnerHtml /><OuterHtml /><ObjectVisible /><Custom /><IsFrame>false</IsFrame><CSSSelector /><FrameID /><PageID /><ObjectHierarchy /><IFrameIndex /><ControlIdentifier /><DelayCondition /></object>
</ScreenModel>


I need the above XML format in MYSQL



Thanks
Vivek Upadhyay

Options: ReplyQuote


Subject
Written By
Posted
Need to convert MSSQL to MYSQL
July 23, 2015 04:18AM


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.