Hist. Sales Trx. Header

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:

Table Number: 40902

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 NameField CaptionClassTypeLengthSQL Column NameSQL DataType
1Primary Key SearchPrimary KeyNormalInteger4
2No. Primary Key SearchNo.NormalCode35
3Sales Trx. Type SearchSales TypeNormalOption4
4Sales Trx. Status SearchSales Trx. StatusNormalOption4
5Currency Code SearchCurrency CodeNormalCode10
Key to join to the Currency table.

Show/hide example query

SELECT
	       [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]
6Sub Total SearchSub TotalNormalDecimal12
7Tax Amount SearchTax AmountNormalDecimal12
8Trade Disc. Amount SearchTrade Discount AmountNormalDecimal12
9Freight Amount SearchFreight AmountNormalDecimal12
10Misc. Amount SearchMiscellaneous AmountNormalDecimal12
11Payment Recv. Amount SearchPayment Received AmountNormalDecimal12
12Disc. Taken Amount SearchDiscount Taken AmountNormalDecimal12
13Total SearchTotalNormalDecimal12
14Document Date SearchDocument DateNormalDate4
15Due Date SearchDue DateNormalDate4
16Actual Ship Date SearchActual Ship DateNormalDate4
17Customer No. SearchCustomer No.NormalText35
Key to join to the Customer table.

Show/hide example query

SELECT
	       [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_]
18Customer Name SearchCustomer NameNormalText100
19Ship-to Code SearchShip-to CodeNormalCode35
Key to join to the Ship-to Address table.

Show/hide example query

SELECT
	       [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]
20Ship-to Name SearchShip-to NameNormalText100
21Ship-to Address SearchShip-to AddressNormalText100
22Ship-to Address 2 SearchShip-to Address 2NormalText50
23Ship-to City SearchShip-to CityNormalText50
Key to join to the Post Code table.

Show/hide example query

SELECT
	       [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]
24Ship-to State SearchShip-to StateNormalText50
25Ship-to Zipcode SearchShip-to ZipcodeNormalText20
26Ship-to Country SearchShip-to CountryNormalText50
27Contact Person Name SearchContact Person NameNormalText100
28Salesperson No. SearchSalesperson No.NormalCode35
29Sales Territory SearchSales TerritoryNormalText50
30Customer Purchase No. SearchCustomer Purchase No.NormalCode35
31Original No. SearchOriginal No.NormalCode35
32Ship Method SearchShip MethodNormalText50
33Audit Code SearchAudit CodeNormalCode35
2000000000$systemId SearchSystem IDNormalGUID16
2000000001SystemCreatedAt SearchCreated AtNormalDateTime8
2000000002SystemCreatedBy SearchCreated ByNormalGUID16
Key to join to the User table.

Show/hide example query

SELECT
	       [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]
2000000003SystemModifiedAt SearchModified AtNormalDateTime8
2000000004SystemModifiedBy SearchModified ByNormalGUID16

Show/hide tables related from Hist. Sales Trx. Header table

Leave a Reply

Your email address will not be published. Required fields are marked *