vw_AddressDetails View

<< Click to Display Table of Contents >>

Navigation:  iVend Database Database > Views >

vw_AddressDetails View

Navigation: iVend Database Database > Views >

hm_btn_navigate_prevhm_btn_navigate_tophm_btn_navigate_next

iVend 6.6 Database Help

vw_AddressDetails View

Collapse All Expand All

iVend Database Database : vw_AddressDetails View

Properties

Creation Date

6/28/2016 9:24 AM

Is Schema Bound

dbimages_boolean-false

Encrypted

dbimages_boolean-false

Ansi Nulls

dbimages_boolean-true

Columns

 

Column Name

Description

Datatype

Length

Allow Nulls

Default

Formula

 

AddressKey

 

BigInt

8

 

 

 

 

ContactKey

 

BigInt

8

 

 

 

 

Address1

 

VarWChar

100

 

 

 

 

Address2

 

VarWChar

100

 

 

 

 

Address3

 

VarWChar

100

 

 

 

 

City

 

VarWChar

100

 

 

 

 

State

 

VarWChar

20

 

 

 

 

StateName

 

VarWChar

100

 

 

 

 

ZipCode

 

VarWChar

30

 

 

 

 

Country

 

VarWChar

20

 

 

 

 

CountryName

 

VarWChar

100

 

 

 

 

County

 

VarWChar

100

 

 

 

 

PhoneNumber

 

VarWChar

20

 

 

 

 

AlternatePhoneNumber

 

VarWChar

20

 

 

 

 

FaxNumber

 

VarWChar

20

 

 

 

 

FullAddress

 

VarWChar

482

dbimages_tick

 

 

Objects that vw_AddressDetails depends on

 

Database Object

Object Type

Description

Dep Level

CfgAddress table

CfgAddress

Table

Defines the address details for each Address.

1

CfgCountry table

CfgCountry

Table

The country details are specified which can be selected further at the addresses entry of the customer/ vendor or which are related to the business in some way.

1

CfgState table

CfgState

Table

The state details are specified which can be selected further at the addresses entry of the customer/ vendor or which are related to the business in some way.

1

View Definition

CREATE VIEW [dbo].[vw_AddressDetails]

AS

SELECT a.AddressKey, a.ContactKey, ISNULL(a.Address1, '') AS Address1, ISNULL(a.Address2, '') AS Address2, ISNULL(a.Address3, '') AS Address3, ISNULL(a.City, '') AS City,

ISNULL(s.Id, '') AS State, ISNULL(s.Description, '') AS StateName, ISNULL(a.ZipCode, '') AS ZipCode, ISNULL(c.Id, '') AS Country, ISNULL(c.Description, '')

AS CountryName, ISNULL(a.County, '') AS County, ISNULL(a.PhoneNumber, '') AS PhoneNumber, ISNULL(a.AlternatePhoneNumber, '') AS AlternatePhoneNumber,

ISNULL(a.FaxNumber, '') AS FaxNumber, ISNULL(a.Address1, '') + ', ' +

CASE WHEN a.Address2 Is NULL OR a.Address2 ='' THEN '' ELSE a.Address2 +', ' END +

CASE WHEN a.Address3 Is NULL OR a.Address3 ='' THEN '' ELSE a.Address3 +', ' END +

CASE WHEN a.City Is NULL OR a.City ='' THEN '' ELSE a.City +', ' END +

CASE WHEN s.Id Is NULL OR s.Id ='' THEN '' ELSE s.Id +', ' END +

CASE WHEN a.ZipCode Is NULL OR a.ZipCode ='' THEN '' ELSE a.ZipCode +', ' END +

ISNULL(c.Id, '') AS FullAddress

FROM dbo.CfgAddress AS a LEFT OUTER JOIN

dbo.CfgCountry AS c ON a.CountryKey = c.CountryKey LEFT OUTER JOIN

dbo.CfgState AS s ON a.StateKey = s.StateKey

See Also

Related Objects

iVend Database Database

 

 


© 2019 All Rights Reserved.

Send comments on this topic.