ReplicationGetMobileSites Stored Procedure

<< Click to Display Table of Contents >>

Navigation:  iVend Database Database > Stored Procedures >

ReplicationGetMobileSites Stored Procedure

Navigation: iVend Database Database > Stored Procedures >

hm_btn_navigate_prevhm_btn_navigate_tophm_btn_navigate_next

iVend 6.6 Database Help

ReplicationGetMobileSites Stored Procedure

Collapse All Expand All

iVend Database Database : ReplicationGetMobileSites Stored Procedure

Properties

Creation Date

4/13/2015 12:00 PM

Encrypted

dbimages_boolean-false

Ansi Nulls

dbimages_boolean-true

Parameters

Parameter

Direction

Description

Data Type

Size

@RETURN_VALUE

Return Value

 

Integer

4

Objects that ReplicationGetMobileSites depends on

 

Database Object

Object Type

Description

Dep Level

CfgSiteInformation table

CfgSiteInformation

Table

Stores the site information. Enterprise always has the site id as 1. System Table Warning : Should not be modified directly

1

RepReplicationSendStatusMobile table

RepReplicationSendStatusMobile

Table

Table used to track the replication record status

1

RtlPOS table

RtlPOS

Table

Contains details about all POS defined in the system.

1

RtlStore table

RtlStore

Table

Contains the details of Stores defined in the system.

1

Procedure Source Code

CREATE PROCEDURE [dbo].[ReplicationGetMobileSites]

AS

BEGIN

SET NOCOUNT ON

Declare @lDataSourceType INT,

  @SiteId   INT

Select @SiteId = SiteId, @lDataSourceType = CASE WHEN SiteId = 1 THEN 1 ELSE 2 END

from CfgSiteInformation

Print @lDataSourceType

SELECT A.DeviceId, IsNull(B.Id, 'POS') as Description

FROM RepReplicationSendStatusMobile A, RtlPOS B, RtlStore C

WHERE B.HardwareId = A.DeviceId AND B.StoreKey = C.StoreKey AND IsNull(B.IsDeleted,'False') = 'False'

  AND

  ((@lDataSourceType = 1 AND B.DataSourceType = @lDataSourceType)

  OR

  (@lDataSourceType <> 1 AND C.SiteId= @SiteId))

END

See Also

Related Objects

iVend Database Database

 

 


© 2019 All Rights Reserved.

Send comments on this topic.