Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/5205
Table Type: Company
Table Name: Employee Relative
Database Table Name: CRONUS UK Ltd_$Employee Relative$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 Employee Relative can be queried.
Show/hide an example select of all columns
SELECT
*
FROM
[CRONUS UK Ltd_$Employee Relative$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns by name
SELECT
[Employee No_]
,[Line No_]
,[Relative Code]
,[First Name]
,[Middle Name]
,[Last Name]
,[Birth Date]
,[Phone No_]
,[$systemId]
,[$systemCreatedAt]
,[$systemCreatedBy]
,[$systemModifiedAt]
,[$systemModifiedBy]
FROM
[CRONUS UK Ltd_$Employee Relative$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns including those from all joined tables
SELECT
*
FROM
[CRONUS UK Ltd_$Employee Relative$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Employee Relative]
LEFT JOIN
[CRONUS UK Ltd_$Relative$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Relative]
ON
[Employee Relative].[Relative Code] = [Relative].[Code]
LEFT JOIN
[User] AS [User]
ON
[Employee Relative].[SystemCreatedBy] = [User].[User Security ID]
LEFT JOIN
[User] AS [User]
ON
[Employee Relative].[SystemModifiedBy] = [User].[User Security ID]
Show/hide columns in Employee Relative table
Field No. | Field Name | Field Caption | Class | Type | Length | SQL Column Name | SQL DataType |
---|---|---|---|---|---|---|---|
1 | Employee No. | Employee No. | Normal | Code | 20 | Employee No_ | nvarchar(40) |
Key to join to the Employee table.Show/hide example querySELECT [Employee Relative].[Employee No_] ,[Employee].[No_] FROM [CRONUS UK Ltd_$Employee Relative$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Employee Relative] LEFT JOIN [CRONUS UK Ltd_$Employee$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Employee] ON [Employee Relative].[Employee No_] = [Employee].[No_] | |||||||
2 | Line No. | Line No. | Normal | Integer | 4 | Line No_ | int |
3 | Relative Code | Relative Code | Normal | Code | 10 | Relative Code | nvarchar(20) |
Key to join to the Relative table.Show/hide example querySELECT [Employee Relative].[Relative Code] ,[Relative].[Code] FROM [CRONUS UK Ltd_$Employee Relative$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Employee Relative] LEFT JOIN [CRONUS UK Ltd_$Relative$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Relative] ON [Employee Relative].[Relative Code] = [Relative].[Code] | |||||||
4 | First Name | First Name | Normal | Text | 30 | First Name | nvarchar(60) |
5 | Middle Name | Middle Name | Normal | Text | 30 | Middle Name | nvarchar(60) |
6 | Last Name | Last Name | Normal | Text | 30 | Last Name | nvarchar(60) |
7 | Birth Date | Birth Date | Normal | Date | 4 | Birth Date | datetime |
8 | Phone No. | Phone No. | Normal | Text | 30 | Phone No_ | nvarchar(60) |
9 | Relative’s Employee No. | Relative’s Employee No. | Normal | Code | 20 | ||
10 | Comment | Comment | FlowField | Boolean | 4 | ||
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 [Employee Relative].[$systemCreatedBy] ,[User].[User Security ID] FROM [CRONUS UK Ltd_$Employee Relative$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Employee Relative] LEFT JOIN [User] AS [User] ON [Employee Relative].[$systemCreatedBy] = [User].[User Security ID] | |||||||
2000000003 | SystemModifiedAt | Modified At | Normal | DateTime | 8 | $systemModifiedAt | datetime |
2000000004 | SystemModifiedBy | Modified By | Normal | GUID | 16 | $systemModifiedBy | uniqueidentifier |