Msg 512, Ebene 16, Status 1, Zeile 2 Die Unterabfrage hat mehr als 1 Wert zurückgegeben. Dies ist nicht zulässig , wenn die Unterabfrage folgt =,! =, <, < =,>,> = oder wenn die Unterabfrage als Ausdruck verwendet wird.Nachricht 512, Ebene 16, Status 1, Zeile 2 Unterabfrage gab mehr als 1 Wert zurück. Dies ist nicht zulässig
(Select LocationID aus Ware.dbo.Dimf L wobei t.OriginalLocationId = l.LocationId und t.CompanyId = l.CompanyId) als LocationID , CASE WHEN (Wählen von UnitTypeId Ware.dbo.DimU ut wo t. unit_type = ut.UnitType) IS NULL THEN 9999 ELSE (Wählen Sie UnitTypeId aus Ware.dbo.DimU ut wobei t.unit_type = ut.UnitType) END als UnitTypeId , CASE WHEN (Wählen Sie FirmwareId aus Ware.dbo.Dimc f wobei t .FirmwareVersion = f.Firmware und t.CompanyId = f.CompanyId) IST NULL THEN 9999 ELSE (Wählen Sie FirmwareId aus Ware.dbo.Dimc f wobei t.FirmwareVersion = f.Firmware und t.CompanyId = f.CompanyId) ENDE als FirmwareId , ISNULL (t.Installs, 0) als Installiert
, AddDate = GETDATE() von # Temp2 t wo (Select LocationID von Ware.dbo.Dimf l wo t.OriginalLocationId = l.LocationId und t.CompanyId = l.CompanyId) nicht null ist Bestellen von LocationID
Ja, und was ist die Frage? – jarlh
Was ist unklar an der Fehlermeldung? –
Ich frage, ob Sie beim Umschreiben der Abfrage helfen könnten – ALE