<< Click to Display Table of Contents >> Navigation: iVend Database Database > Views > vw_AddressDetails View |
Navigation: iVend Database Database > Views >
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 |
|
Encrypted |
|
Ansi Nulls |
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 |
|
|
Objects that vw_AddressDetails depends on
|
Database Object |
Object Type |
Description |
Dep Level |
Table |
Defines the address details for each Address. |
1 |
||
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 |
||
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
© 2019 All Rights Reserved.
Send comments on this topic.