Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/40902
Table Type: Company
Table Name: Hist. Sales Trx. Header
Database Table Name:
Due to how Dynamics BC tables and columns are named, square brackets need to be wrapped around the table name and column names. Below are example queries showing how Hist. Sales Trx. Header can be queried.
Show/hide an example select of all columns
SELECT
*
FROM
[]
Show/hide an example select of all columns by name
SELECT
FROM
[]
Show/hide an example select of all columns including those from all joined tables
SELECT
*
FROM
[] AS [Hist. Sales Trx. Header]
LEFT JOIN
[CRONUS UK Ltd_$Currency$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Currency]
ON
[Hist. Sales Trx. Header].[Currency Code] = [Currency].[Code]
LEFT JOIN
[CRONUS UK Ltd_$Ship-to Address$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Ship-to Address]
ON
[Hist. Sales Trx. Header].[Ship-to Code] = [Ship-to Address].[Code]
LEFT JOIN
[CRONUS UK Ltd_$Post Code$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Post Code]
ON
[Hist. Sales Trx. Header].[Ship-to City] = [Post Code].[City]
LEFT JOIN
[User] AS [User]
ON
[Hist. Sales Trx. Header].[SystemCreatedBy] = [User].[User Security ID]
LEFT JOIN
[User] AS [User]
ON
[Hist. Sales Trx. Header].[SystemModifiedBy] = [User].[User Security ID]
Show/hide columns in Hist. Sales Trx. Header table
Field No. | Field Name | Field Caption | Class | Type | Length | SQL Column Name | SQL DataType |
---|---|---|---|---|---|---|---|
1 | Primary Key | Primary Key | Normal | Integer | 4 | ||
2 | No. | No. | Normal | Code | 35 | ||
3 | Sales Trx. Type | Sales Type | Normal | Option | 4 | ||
4 | Sales Trx. Status | Sales Trx. Status | Normal | Option | 4 | ||
5 | Currency Code | Currency Code | Normal | Code | 10 | ||
Key to join to the Currency table.Show/hide example querySELECT [Hist. Sales Trx. Header].[] ,[Currency].[Code] FROM [] AS [Hist. Sales Trx. Header] LEFT JOIN [CRONUS UK Ltd_$Currency$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Currency] ON [Hist. Sales Trx. Header].[] = [Currency].[Code] | |||||||
6 | Sub Total | Sub Total | Normal | Decimal | 12 | ||
7 | Tax Amount | Tax Amount | Normal | Decimal | 12 | ||
8 | Trade Disc. Amount | Trade Discount Amount | Normal | Decimal | 12 | ||
9 | Freight Amount | Freight Amount | Normal | Decimal | 12 | ||
10 | Misc. Amount | Miscellaneous Amount | Normal | Decimal | 12 | ||
11 | Payment Recv. Amount | Payment Received Amount | Normal | Decimal | 12 | ||
12 | Disc. Taken Amount | Discount Taken Amount | Normal | Decimal | 12 | ||
13 | Total | Total | Normal | Decimal | 12 | ||
14 | Document Date | Document Date | Normal | Date | 4 | ||
15 | Due Date | Due Date | Normal | Date | 4 | ||
16 | Actual Ship Date | Actual Ship Date | Normal | Date | 4 | ||
17 | Customer No. | Customer No. | Normal | Text | 35 | ||
Key to join to the Customer table.Show/hide example querySELECT [Hist. Sales Trx. Header].[] ,[Customer].[No_] FROM [] AS [Hist. Sales Trx. Header] LEFT JOIN [CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer] ON [Hist. Sales Trx. Header].[] = [Customer].[No_] | |||||||
18 | Customer Name | Customer Name | Normal | Text | 100 | ||
19 | Ship-to Code | Ship-to Code | Normal | Code | 35 | ||
Key to join to the Ship-to Address table.Show/hide example querySELECT [Hist. Sales Trx. Header].[] ,[Ship-to Address].[Code] FROM [] AS [Hist. Sales Trx. Header] LEFT JOIN [CRONUS UK Ltd_$Ship-to Address$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Ship-to Address] ON [Hist. Sales Trx. Header].[] = [Ship-to Address].[Code] | |||||||
20 | Ship-to Name | Ship-to Name | Normal | Text | 100 | ||
21 | Ship-to Address | Ship-to Address | Normal | Text | 100 | ||
22 | Ship-to Address 2 | Ship-to Address 2 | Normal | Text | 50 | ||
23 | Ship-to City | Ship-to City | Normal | Text | 50 | ||
Key to join to the Post Code table.Show/hide example querySELECT [Hist. Sales Trx. Header].[] ,[Post Code].[City] FROM [] AS [Hist. Sales Trx. Header] LEFT JOIN [CRONUS UK Ltd_$Post Code$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Post Code] ON [Hist. Sales Trx. Header].[] = [Post Code].[City] | |||||||
24 | Ship-to State | Ship-to State | Normal | Text | 50 | ||
25 | Ship-to Zipcode | Ship-to Zipcode | Normal | Text | 20 | ||
26 | Ship-to Country | Ship-to Country | Normal | Text | 50 | ||
27 | Contact Person Name | Contact Person Name | Normal | Text | 100 | ||
28 | Salesperson No. | Salesperson No. | Normal | Code | 35 | ||
29 | Sales Territory | Sales Territory | Normal | Text | 50 | ||
30 | Customer Purchase No. | Customer Purchase No. | Normal | Code | 35 | ||
31 | Original No. | Original No. | Normal | Code | 35 | ||
32 | Ship Method | Ship Method | Normal | Text | 50 | ||
33 | Audit Code | Audit Code | Normal | Code | 35 | ||
2000000000 | $systemId | System ID | Normal | GUID | 16 | ||
2000000001 | SystemCreatedAt | Created At | Normal | DateTime | 8 | ||
2000000002 | SystemCreatedBy | Created By | Normal | GUID | 16 | ||
Key to join to the User table.Show/hide example querySELECT [Hist. Sales Trx. Header].[] ,[User].[User Security ID] FROM [] AS [Hist. Sales Trx. Header] LEFT JOIN [User] AS [User] ON [Hist. Sales Trx. Header].[] = [User].[User Security ID] | |||||||
2000000003 | SystemModifiedAt | Modified At | Normal | DateTime | 8 | ||
2000000004 | SystemModifiedBy | Modified By | Normal | GUID | 16 |