Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/286
Table Type: Company
Table Name: Territory
Database Table Name: CRONUS UK Ltd_$Territory$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 Territory can be queried.
Show/hide an example select of all columns
SELECT
*
FROM
[CRONUS UK Ltd_$Territory$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns by name
SELECT
[Code]
,[Name]
,[$systemId]
,[$systemCreatedAt]
,[$systemCreatedBy]
,[$systemModifiedAt]
,[$systemModifiedBy]
FROM
[CRONUS UK Ltd_$Territory$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns including those from all joined tables
SELECT
*
FROM
[CRONUS UK Ltd_$Territory$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Territory]
LEFT JOIN
[User] AS [User]
ON
[Territory].[SystemCreatedBy] = [User].[User Security ID]
LEFT JOIN
[User] AS [User]
ON
[Territory].[SystemModifiedBy] = [User].[User Security ID]
Show/hide columns in Territory table
Field No. | Field Name | Field Caption | Class | Type | Length | SQL Column Name | SQL DataType |
---|---|---|---|---|---|---|---|
1 | Code | Code | Normal | Code | 10 | Code | nvarchar(20) |
2 | Name | Name | Normal | Text | 50 | Name | nvarchar(100) |
2000000000 | $systemId | System ID | Normal | GUID | 16 | $systemId | uniqueidentifier |
2000000001 | SystemCreatedAt | Created At | Normal | DateTime | 8 | $systemCreatedAt | datetime |
2000000002 | SystemCreatedBy | Created By | Normal | GUID | 16 | $systemCreatedBy | uniqueidentifier |
Key to join to the User table.Show/hide example querySELECT [Territory].[$systemCreatedBy] ,[User].[User Security ID] FROM [CRONUS UK Ltd_$Territory$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Territory] LEFT JOIN [User] AS [User] ON [Territory].[$systemCreatedBy] = [User].[User Security ID] | |||||||
2000000003 | SystemModifiedAt | Modified At | Normal | DateTime | 8 | $systemModifiedAt | datetime |
2000000004 | SystemModifiedBy | Modified By | Normal | GUID | 16 | $systemModifiedBy | uniqueidentifier |