Easily find this page again using the shortlink: https://bct.azrcrv.co.uk/5520
Table Type: Company
Table Name: Unplanned Demand
Database Table Name: CRONUS UK Ltd_$Unplanned Demand$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 Unplanned Demand can be queried.
Show/hide an example select of all columns
SELECT
*
FROM
[CRONUS UK Ltd_$Unplanned Demand$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns by name
SELECT
[timestamp]
,[Demand Type]
,[Demand SubType]
,[Demand Order No_]
,[Demand Line No_]
,[Demand Ref_ No_]
,[Sell-to Customer No_]
,[Description]
,[Demand Date]
,[Status]
,[Item No_]
,[Variant Code]
,[Location Code]
,[Quantity (Base)]
,[Level]
,[Bin Code]
,[Qty_ per Unit of Measure]
,[Unit of Measure Code]
,[Reserve]
,[Needed Qty_ (Base)]
,[Special Order]
,[Purchasing Code]
,[$systemId]
,[$systemCreatedAt]
,[$systemCreatedBy]
,[$systemModifiedAt]
,[$systemModifiedBy]
FROM
[CRONUS UK Ltd_$Unplanned Demand$437dbf0e-84ff-417a-965d-ed2bb9650972]
Show/hide an example select of all columns including those from all joined tables
SELECT
*
FROM
[CRONUS UK Ltd_$Unplanned Demand$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Unplanned Demand]
LEFT JOIN
[CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer]
ON
[Unplanned Demand].[Sell-to Customer No_] = [Customer].[No_]
LEFT JOIN
[CRONUS UK Ltd_$Item$c526b3e9-b8ca-4683-81ba-fcd5f6b1472a] AS [Item]
ON
[Unplanned Demand].[Item No_] = [Item].[No_]
LEFT JOIN
[CRONUS UK Ltd_$Location$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Location]
ON
[Unplanned Demand].[Location Code] = [Location].[Code]
LEFT JOIN
[CRONUS UK Ltd_$Unit of Measure$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Unit of Measure]
ON
[Unplanned Demand].[Unit of Measure Code] = [Unit of Measure].[Code]
Show/hide columns in Unplanned Demand table
Column ID | Column Name | Data Type | ||||
---|---|---|---|---|---|---|
1 | timestamp ![]() | timestamp | ||||
2 | Demand Type ![]() ![]() | int | ||||
3 | Demand SubType ![]() ![]() | int | ||||
4 | Demand Order No_ ![]() ![]() | nvarchar(40) | ||||
5 | Demand Line No_ ![]() ![]() | int | ||||
6 | Demand Ref_ No_ ![]() ![]() | int | ||||
7 | Sell-to Customer No_ ![]() | nvarchar(40) | ||||
Key to join to the Customer table.Show/hide example querySELECT
[Unplanned Demand].[Sell-to Customer No_]
,[Customer].[No_]
FROM
[CRONUS UK Ltd_$Unplanned Demand$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Unplanned Demand]
LEFT JOIN
[CRONUS UK Ltd_$Customer$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Customer]
ON
[Unplanned Demand].[Sell-to Customer No_] = [Customer].[No_] | ||||||
8 | Description ![]() | nvarchar(200) | ||||
9 | Demand Date ![]() | datetime | ||||
10 | Status ![]() | int | ||||
11 | Item No_ ![]() | nvarchar(40) | ||||
Key to join to the Item table.Show/hide example querySELECT
[Unplanned Demand].[Item No_]
,[Item].[No_]
FROM
[CRONUS UK Ltd_$Unplanned Demand$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Unplanned Demand]
LEFT JOIN
[CRONUS UK Ltd_$Item$c526b3e9-b8ca-4683-81ba-fcd5f6b1472a] AS [Item]
ON
[Unplanned Demand].[Item No_] = [Item].[No_] | ||||||
12 | Variant Code ![]() | nvarchar(20) | ||||
13 | Location Code ![]() | nvarchar(20) | ||||
Key to join to the Location table.Show/hide example querySELECT
[Unplanned Demand].[Location Code]
,[Location].[Code]
FROM
[CRONUS UK Ltd_$Unplanned Demand$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Unplanned Demand]
LEFT JOIN
[CRONUS UK Ltd_$Location$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Location]
ON
[Unplanned Demand].[Location Code] = [Location].[Code] | ||||||
14 | Quantity (Base) ![]() | decimal(38,38) | ||||
15 | Level ![]() | int | ||||
16 | Bin Code ![]() | nvarchar(40) | ||||
17 | Qty_ per Unit of Measure ![]() | decimal(38,38) | ||||
18 | Unit of Measure Code ![]() | nvarchar(20) | ||||
Key to join to the Unit of Measure table.Show/hide example querySELECT
[Unplanned Demand].[Unit of Measure Code]
,[Unit of Measure].[Code]
FROM
[CRONUS UK Ltd_$Unplanned Demand$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Unplanned Demand]
LEFT JOIN
[CRONUS UK Ltd_$Unit of Measure$437dbf0e-84ff-417a-965d-ed2bb9650972] AS [Unit of Measure]
ON
[Unplanned Demand].[Unit of Measure Code] = [Unit of Measure].[Code] | ||||||
19 | Reserve ![]() | tinyint | ||||
20 | Needed Qty_ (Base) ![]() | decimal(38,38) | ||||
21 | Special Order ![]() | tinyint | ||||
22 | Purchasing Code ![]() | nvarchar(20) | ||||
23 | $systemId ![]() | uniqueidentifier | ||||
24 | $systemCreatedAt ![]() | datetime | ||||
25 | $systemCreatedBy ![]() | uniqueidentifier | ||||
26 | $systemModifiedAt ![]() | datetime | ||||
27 | $systemModifiedBy ![]() | uniqueidentifier |