Views [dbo].[InternationalCustomsAgentAddresses]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnNo
Created6:18:11 PM Tuesday, February 27, 2007
Last Modified9:13:24 AM Friday, December 7, 2018
Columns
Name
InternationalCustomsAgentFID
Address
City
State
CountryCodeStandardFID
PostalCode
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
SET QUOTED_IDENTIFIER OFF
GO
/**
*    $File: //Dev02/Maroon/R2_1/MoversSuite/International/SQL/Views/InternationalCustomsAgentAddresses.sql $
*    $DateTime: 2009/07/23 13:16:18 $
*    $Change: 26601 $
*    $Revision: #1 $
*    $Author: ssaad $
*    
*    Description: This view returns the International Customs Agent information
*
*/


CREATE view [dbo].[InternationalCustomsAgentAddresses]
(
    InternationalCustomsAgentFID,
    Address,
    City,
    State,
    CountryCodeStandardFID,
    PostalCode
)
as

select
    InternationalCustomsAgentFID = InternationalCustomsAgent.InternationalCustomsAgentID,
    Address = dbo.BuildAddressFromAddressParts
    (
        InternationalCustomsAgentAddress.Address1,
        InternationalCustomsAgentAddress.Address2,
        InternationalCustomsAgentAddress.Address3
    ),
    City = InternationalCustomsAgentAddress.City,
    State = InternationalCustomsAgentAddress.State,
    CountryCodeStandardFID = InternationalCustomsAgentAddress.CountryCodeStandardFID,
    PostalCode = InternationalCustomsAgentAddress.PostalCode
from InternationalCustomsAgent
left outer join AddressType on AddressType.TypeName = 'Main'
left outer join InternationalCustomsAgentAddress on
(
    InternationalCustomsAgent.InternationalCustomsAgentID = InternationalCustomsAgentAddress.InternationalCustomsAgentFID and
    AddressType.AddressTypeID = InternationalCustomsAgentAddress.AddressTypeFID
)
                                            
GO
GRANT SELECT ON  [dbo].[InternationalCustomsAgentAddresses] TO [MssExec]
GRANT INSERT ON  [dbo].[InternationalCustomsAgentAddresses] TO [MssExec]
GRANT DELETE ON  [dbo].[InternationalCustomsAgentAddresses] TO [MssExec]
GRANT UPDATE ON  [dbo].[InternationalCustomsAgentAddresses] TO [MssExec]
GO
Uses