8. April 2011 09:09
SELECT DISTINCT
TOP (100) PERCENT [Item No_], [Variant Code], [Lot No_], [Open], SUM([Remaining Number]) AS Number, SUM([Remaining Quantity]) AS Quantity
FROM dbo.[Nirotec_Eingabe$Item Ledger Entry]
WHERE ([Open] = 1)
GROUP BY [Item No_], [Variant Code], [Lot No_], [Open]
ORDER BY [Item No_]
8. April 2011 09:10
8. April 2011 09:21
]---------------------------
Microsoft Dynamics NAV
---------------------------
Der Schlüssel existiert bereits.
Hinweis: Die Felder des Primärschlüssels werden an alle Sekundärschlüssel angehängt, damit sie eindeutig werden.
Tabelle: ***
Schlüsselfelder: Item No.,Variant Code,Lot No.
---------------------------
OK
---------------------------
8. April 2011 10:34
8. April 2011 11:27
10. April 2011 16:05
GROUP BY [Item No_], [Variant Code], [Lot No_], [Open]
"Item No.", "Variant Code", "Lot No.", "Open"
CREATE VIEW dbo.[Nirotec_Eingabe$Item Lot Nos_]
WITH SCHEMABINDING
AS
SELECT
[Item No_], [Variant Code], [Lot No_], [Open],
COUNT_BIG(*) as "Cnt",
SUM([Remaining Number]) AS Number,
SUM([Remaining Quantity]) AS Quantity
FROM dbo.[Nirotec_Eingabe$Item Ledger Entry]
WHERE ([Open] = 1)
GROUP BY [Item No_], [Variant Code], [Lot No_], [Open]
GO
CREATE UNIQUE CLUSTERED INDEX [Nirotec_Eingabe$Item Lot Nos_$0] ON dbo.[Nirotec_Eingabe$Item Lot Nos_]
([Item No_], [Variant Code], [Lot No_], [Open])
GO
11. April 2011 09:31