Advertisement
MichaelFade

Untitled

Nov 27th, 2024
93
0
339 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 3.09 KB | None | 0 0
  1.  
  2. --SELECT * FROM TblLines
  3.  
  4. SELECT
  5.     123 AS ID,
  6.     'Line1' AS LName,
  7.     'Line1' AS EName,
  8.     10 AS Department,
  9.     'Line one.' AS ERPID,
  10.     'Some descr' AS Description,
  11.     1 AS IsActive,
  12.     1 AS MultiJobActivation,
  13.     0 AS MultiSetupEnd,
  14.     1 AS MultiUnitsInCycleChange,
  15.     5 AS RootEventAttachDurationMin,
  16.     100 AS FirstMachineID,
  17.     300 AS LastMachineID,
  18.     1 AS OperatorLoginSimultaneously,
  19.     5 AS DisplayOrder,
  20.     200 AS GrossUnitsMachineID,
  21.     300 AS ReportedUnitsMachineID,
  22.     1337 AS LineSpeedID,
  23.     'CycleTime' AS LineSpeedName
  24.  
  25. --SELECT * FROM TblLineMachines
  26.  
  27. SELECT
  28.     123 AS LineID,
  29.     100 AS MachineID,
  30.     1 AS SEQUENCE,
  31.     1 AS IsActive,
  32.     5 AS RootEventAttachDurationMin,
  33.     0 AS IncludeInCycleTimeCalc,
  34.     0 AS IncludeInAvailabilityCalc,
  35.     200 AS NextMachines,
  36.     0 AS Root
  37.     UNION ALL
  38. SELECT
  39.     123 AS LineID,
  40.     200 AS MachineID,
  41.     2 AS SEQUENCE,
  42.     1 AS IsActive,
  43.     0 AS RootEventAttachDurationMin,
  44.     1 AS IncludeInCycleTimeCalc,
  45.     1 AS IncludeInAvailabilityCalc,
  46.     300 AS NextMachines,
  47.     0 AS Root
  48.     UNION ALL
  49. SELECT
  50.     123 AS LineID,
  51.     300 AS MachineID,
  52.     3 AS SEQUENCE,
  53.     1 AS IsActive,
  54.     0 AS RootEventAttachDurationMin,
  55.     0 AS IncludeInCycleTimeCalc,
  56.     1 AS IncludeInAvailabilityCalc,
  57.     NULL AS NextMachines,
  58.     0 AS Root
  59.  
  60.  
  61. --SELECT * FROM TblRoutes
  62.  
  63. SELECT
  64.     321 AS ID,
  65.     123 AS LineId,
  66.     'Some Route' AS ERPID,
  67.     'Hello' AS Description,
  68.     1111 AS UserID,
  69.     '2024-11-27' AS LastUpdate
  70.  
  71.  
  72. --SELECT * FROM TblRouteDetails
  73.  
  74. SELECT
  75.     321 AS RouteId,
  76.     100 AS MachineId,
  77.     1 AS DisplayOrder, 
  78.     1 AS FirstMachine, 
  79.     0 AS LastMachine,  
  80.     NULL AS LineSpeedID,   
  81.     NULL AS LineSpeedName, 
  82.     0 AS MachineBtwFirstAndLast,   
  83.     0 AS IncludeInCycleTimeCalc,   
  84.     0 AS IncludeInAvailabilityCalc,
  85.     0 AS GrossUnitsMachineID,
  86.     0 AS ReportedUnitsMachineID,   
  87.     0 AS IncludeInWIP, 
  88.     NULL AS ParallelUnitsSplit,
  89.     1 AS ParallelMachinesGroupID
  90. UNION ALL
  91. SELECT
  92.     321 AS RouteId,
  93.     200 AS MachineId,
  94.     2 AS DisplayOrder, 
  95.     0 AS FirstMachine, 
  96.     0 AS LastMachine,  
  97.     1337 AS LineSpeedID,   
  98.     'CycleTime' AS LineSpeedName,  
  99.     1 AS MachineBtwFirstAndLast,   
  100.     1 AS IncludeInCycleTimeCalc,   
  101.     1 AS IncludeInAvailabilityCalc,
  102.     1 AS GrossUnitsMachineID,
  103.     0 AS ReportedUnitsMachineID,   
  104.     0 AS IncludeInWIP, 
  105.     NULL AS ParallelUnitsSplit,
  106.     2 AS ParallelMachinesGroupID
  107. UNION ALL
  108. SELECT
  109.     321 AS RouteId,
  110.     300 AS MachineId,
  111.     3 AS DisplayOrder, 
  112.     0 AS FirstMachine, 
  113.     1 AS LastMachine,  
  114.     NULL AS LineSpeedID,   
  115.     NULL AS LineSpeedName, 
  116.     1 AS MachineBtwFirstAndLast,   
  117.     0 AS IncludeInCycleTimeCalc,   
  118.     1 AS IncludeInAvailabilityCalc,
  119.     0 AS GrossUnitsMachineID,
  120.     1 AS ReportedUnitsMachineID,   
  121.     0 AS IncludeInWIP, 
  122.     NULL AS ParallelUnitsSplit,
  123.     3 AS ParallelMachinesGroupID
  124.  
  125. --SELECT * FROM TblParallelMachineGroupInLine
  126.  
  127. SELECT 1 AS ID, 123 AS LineID, 321 AS RouteID
  128. UNION ALL
  129. SELECT 2 AS ID, 123 AS LineID, 321 AS RouteID
  130. UNION ALL
  131. SELECT 3 AS ID, 123 AS LineID, 321 AS RouteID
  132.  
  133.  
  134. --SELECT * FROM TblLineRoute
  135.  
  136. SELECT 123 AS LineID, 100 AS SourceMachineID, 200 AS TargetMachineID
  137. UNION ALL
  138. SELECT 123 AS LineID, 200 AS SourceMachineID, 300 AS TargetMachineID
  139. UNION ALL
  140. SELECT 123 AS LineID, 300 AS SourceMachineID, NULL AS TargetMachineID
  141.  
  142.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement