 Create FUNCTION [dbo].[GetShopCode]()
  RETURNS Varchar(3)
  AS
  BEGIN
    Return(Select Store_Code From tblShopSettings Where Remote_Kind = '1')
  END