Stored Procedures [dbo].[GetXmlOrderLink]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inXmlSystemDataTypeMapvarchar(64)64
@inOrderIdint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
/**
*    
*    Gets the external ID(s) of an order for an Xml System from the XmlOrderLink value.
*    @param: @inXmlSystemDataTypeMap - The name of an XML system data type map (i.e. 'Wheaton Order Information')
*    @param: @inOrderId - Primary key of a MoversSuite order.
*/


create procedure [dbo].[GetXmlOrderLink]
    @inXmlSystemDataTypeMap varchar(64),
    @inOrderId int
as
set nocount on

declare @theXmlSystemId int
select @theXmlSystemId = XmlSystemFID
from XmlSystemDataTypeMap
where [Name] = @inXmlSystemDataTypeMap

select
    ExternalKey,
    SecondaryExternalKey
from XmlOrderLink
where
    OrderFID = @inOrderID and
    XmlSystemFID = @theXmlSystemId
GO
GRANT EXECUTE ON  [dbo].[GetXmlOrderLink] TO [MssExec]
GO
Uses