Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/2103
Table Type: Company
Table Name: O365 Sales Document
Database Table Name: CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972
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 O365 Sales Document can be queried.
Show/hide an example select of all columns
SELECT
*
FROM
[CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns by name
SELECT
[timestamp]
,[Document Type]
,[No_]
,[Posted]
,[Sell-to Customer No_]
,[Due Date]
,[Currency Code]
,[Sell-to Customer Name]
,[Sell-to Contact]
,[Document Date]
,[IsTest]
,[Currency Symbol]
,[Document Status]
,[Sales Amount]
,[Outstanding Amount]
,[Total Invoiced Amount]
,[Outstanding Status]
,[Document Icon]
,[Payment Method]
,[Display No_]
,[$systemId]
,[$systemCreatedAt]
,[$systemCreatedBy]
,[$systemModifiedAt]
,[$systemModifiedBy]
FROM
[CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns including those from all joined tables
SELECT
*
FROM
[CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
[CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer]
ON
[O365 Sales Document].[Sell-to Customer No_] = [Customer].[No_]
LEFT JOIN
[CRONUS UK Ltd_$Currency$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Currency]
ON
[O365 Sales Document].[Currency Code] = [Currency].[Code]
Show/hide columns in O365 Sales Document table
Column ID | Column Name | Data Type | ||||
---|---|---|---|---|---|---|
1 | timestamp ![]() | timestamp | ||||
2 | Document Type ![]() ![]() | int | ||||
3 | No_ ![]() ![]() | nvarchar(40) | ||||
4 | Posted ![]() ![]() | tinyint | ||||
5 | Sell-to Customer No_ ![]() | nvarchar(40) | ||||
Key to join to the Customer table.Show/hide example querySELECT
[O365 Sales Document].[Sell-to Customer No_]
,[Customer].[No_]
FROM
[CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
[CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer]
ON
[O365 Sales Document].[Sell-to Customer No_] = [Customer].[No_] | ||||||
6 | Due Date ![]() | datetime | ||||
7 | Currency Code ![]() | nvarchar(20) | ||||
Key to join to the Currency table.Show/hide example querySELECT
[O365 Sales Document].[Currency Code]
,[Currency].[Code]
FROM
[CRONUS UK Ltd_$O365 Sales Document$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [O365 Sales Document]
LEFT JOIN
[CRONUS UK Ltd_$Currency$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Currency]
ON
[O365 Sales Document].[Currency Code] = [Currency].[Code] | ||||||
8 | Sell-to Customer Name ![]() | nvarchar(200) | ||||
9 | Sell-to Contact ![]() | nvarchar(200) | ||||
10 | Document Date ![]() | datetime | ||||
11 | IsTest ![]() | tinyint | ||||
12 | Currency Symbol ![]() | nvarchar(20) | ||||
13 | Document Status ![]() | int | ||||
14 | Sales Amount ![]() | decimal(38,38) | ||||
15 | Outstanding Amount ![]() | decimal(38,38) | ||||
16 | Total Invoiced Amount ![]() | nvarchar(500) | ||||
17 | Outstanding Status ![]() | nvarchar(500) | ||||
18 | Document Icon ![]() | uniqueidentifier | ||||
19 | Payment Method ![]() | nvarchar(20) | ||||
20 | Display No_ ![]() | nvarchar(40) | ||||
21 | $systemId ![]() | uniqueidentifier | ||||
22 | $systemCreatedAt ![]() | datetime | ||||
23 | $systemCreatedBy ![]() | uniqueidentifier | ||||
24 | $systemModifiedAt ![]() | datetime | ||||
25 | $systemModifiedBy ![]() | uniqueidentifier |