Views [dbo].[InternationalBOLConsigneeAddresses]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnNo
Created6:18:17 PM Tuesday, February 27, 2007
Last Modified1:53:56 PM Wednesday, April 10, 2024
Columns
Name
InternationalBOLConsigneeFID
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/InternationalBOLConsigneeAddresses.sql $
*    $DateTime: 2009/07/23 13:16:18 $
*    $Change: 26601 $
*    $Revision: #1 $
*    $Author: ssaad $
*    
*    Description: This view returns the International BOL Consignee information
*
*/


CREATE view [dbo].[InternationalBOLConsigneeAddresses]
(
    InternationalBOLConsigneeFID,
    Address,
    City,
    State,
    CountryCodeStandardFID,
    PostalCode
)
as

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