April 12, 2007 at 1:36 am
I first declare @gelFormulaResult
SELECT @gelFormulaResult = RescAddon.[aogeltype]
FROM BRMEMADBS21.Protean.dbo.CoOrderSumry as os
INNER JOIN BRMEMADBS21.Protean.dbo.coOrderLineItem as oli
ON oli.ParentObjectID = os.ObjectID
AND oli.ParentClassID = 11325
AND oli.CollectionID = 1
INNER JOIN BRMEMADBS21.Protean.dbo.coOrderDeliv as od
ON od.ParentObjectID = oli.ObjectID
AND od.ParentClassID = 11341
AND od.CollectionID = 1
LEFT JOIN BRMEMADBS21.Protean.dbo.coSalesCatalogI as ci
ON ci.ObjectID = oli.SaleCatObjectID
INNER JOIN BRMEMADBS21.Protean.dbo.fdTradingPartne as tp
ON tp.ObjectID = os.OByTPObjectID
LEFT JOIN BRMEMADBS21.Protean.dbo.fdBasREsc as resc
ON resc.ObjectID = oli.OrdRescObjectID
INNER JOIN BRMEMADBS21.Protean.dbo.AOATTRIBUTESCAP as RescAddOn
ON RescAddOn.ParentObjectID = resc.ObjectID AND RescAddOn.ParentClassID = 10153
WHERE os.OrderOrdName+'-'+cast(oli.SequenceNumber as varchar(2))+'-'+cast(od.SequenceNumber as varchar(2)) = @cust_order_nr
I tried putting the columname (aogeltype) between brackets (as you can see in the piece of code I included. This also does not work.
What could be the problem?
April 12, 2007 at 3:44 am
There could be a number of issues here, causes of this error can include naming, aliasing, or join errors. I'll list what I can think of:
1. Check the owner of the tables is dbo.
2. You have a LEFT JOIN to coSalesCatlogI but it is not used in the query?
3. Should the fdTradingPartne table have an 'r' on the end?
4. Change the LEFT JOIN fdBesREsc and INNER JOIN AOATTRIBUTESCAP to
LEFT JOIN (
SELECT rescAddOn.aogelType, resc.objectID
FROM BRMEMADBS21.Protean.dbo.fdBasREsc as resc
INNER JOIN BRMEMADBS21.Protean.dbo.AOATTRIBUTESCAP as RescAddOn
ON RescAddOn.ParentObjectID = resc.ObjectID
AND RescAddOn.ParentClassID = 10153
)RescAddOn
ON RescAddOn.objectID = oli.OrdRescObjectID
I hope that some of this is useful, if not, let me know and I shall meet with the drawing board once again.
April 12, 2007 at 4:14 am
1. dbo is owner
2. I removed the that join
3. no 'r' at the end is correct.
4. changed it as you suggested.
Still the same issue.
Further information:
The example I have given is part of a stored procedure and only 1 in over a 100 errors (all the same errors: multi-part identifier could not be bound).
The stored procedure is part of a SQL Server 2000 Project in Visual Studio 2005.
April 12, 2007 at 4:39 am
April 12, 2007 at 5:24 am
Is this ok?
CREATE
TABLE [dbo].[AOATTRIBUTESCAP](
[fdAddOnID] [int]
NOT NULL DEFAULT (0),
[ParentObjectID] [int]
NULL DEFAULT (0),
[ParentClassID] [int]
NULL DEFAULT (0),
[aosize] [varchar]
(128) NULL,
[aoclosure] [varchar]
(128) NULL,
[aoprint] [varchar]
(128) NULL,
[aobody] [varchar]
(15) NULL,
[aocap] [varchar]
(15) NULL,
[aoartwork1] [varchar]
(15) NULL,
[aoartwork2] [varchar]
(15) NULL,
[aoink1] [varchar]
(15) NULL,
[aoink2] [varchar]
(15) NULL,
[aogeltype] [varchar]
(128) NULL,
[aogroove] [varchar]
(128) NULL,
[aoeglide] [varchar]
(128) NULL,
PRIMARY
KEY CLUSTERED
(
[fdAddOnID]
ASC
)
WITH FILLFACTOR = 90 ON [PRIMARY]
)
ON [PRIMARY]
----------------------------------------------
CREATE
TABLE [dbo].[coOrderSumry](
[ObjectID] [int]
NOT NULL,
[OrderOrdObjID] [int]
NOT NULL,
[OrderOrdIns] [int]
NOT NULL,
[OrderSite] [varchar]
(4) NULL,
[OrderOrdName] [varchar]
(15) NULL,
[Updates] [int]
NOT NULL,
[SecGrp1ObjectID] [int]
NULL,
[SecGrp1ClassID] [int]
NULL,
[SecGrp2ObjectID] [int]
NULL,
[SecGrp2ClassID] [int]
NULL,
[SecGrp3ObjectID] [int]
NULL,
[SecGrp3ClassID] [int]
NULL,
[SecGrp4ObjectID] [int]
NULL,
[SecGrp4ClassID] [int]
NULL,
[SecGrp5ObjectID] [int]
NULL,
[SecGrp5ClassID] [int]
NULL,
[SiteObjectID] [int]
NULL,
[DateCreated] [datetime]
NULL,
[CreatorObjectID] [int]
NULL,
[CreatorClassID] [int]
NULL,
[LastEditDate] [datetime]
NULL,
[LastEditorObjectID] [int]
NULL,
[LastEditorClassID] [int]
NULL,
[CheckedOutDate] [datetime]
NULL,
[CurEditorObjectID] [int]
NULL,
[CurEditorClassID] [int]
NULL,
[AdminSiteObjectID] [int]
NULL,
[AdminSite] [varchar]
(4) NULL,
[AppLock] [int]
NOT NULL,
[IconName] [varchar]
(30) NULL,
[AttachmntsIsEmpty] [int]
NOT NULL,
[AddOnsIsEmpty] [int]
NOT NULL,
[OrdAutDzObjectID] [int]
NULL,
[OrdAutDzEffDate] [datetime]
NULL,
[OrdAutDz] [varchar]
(30) NULL,
[LastActnIndex] [int]
NULL,
[AutoFailFlag] [int]
NULL,
[DelEvntsClassID] [int]
NULL,
[DelEvntsIsEmpty] [int]
NOT NULL,
[TTOClassID] [int]
NULL,
[TTOObjectID] [int]
NULL,
[OByTPObjectID] [int]
NULL,
[OByTP] [varchar]
(30) NULL,
[ChargOrd] [int]
NULL,
[SmryCmntsClassID] [int]
NULL,
[SmryCmntsIsEmpty] [int]
NOT NULL,
[SmryCondsClassID] [int]
NULL,
[SmryCondsIsEmpty] [int]
NOT NULL,
[GrossBaAmt] [float]
NULL,
[GrossBaAmtPrec] [int]
NULL,
[GrossBaAmtCurOID] [int]
NULL,
[GrossBaAmtCur] [varchar]
(3) NULL,
[GrossTrAmt] [float]
NULL,
[GrossTrAmtPrec] [int]
NULL,
[GrossTrAmtCurOID] [int]
NULL,
[GrossTrAmtCur] [varchar]
(3) NULL,
[DiscBaAmt] [float]
NULL,
[DiscTrAmt] [float]
NULL,
[ChrgBaAmt] [float]
NULL,
[ChrgTrAmt] [float]
NULL,
[TaxBaseAmt] [float]
NULL,
[TaxTranAmt] [float]
NULL,
[NetTaxBAmt] [float]
NULL,
[NetTaxTAmt] [float]
NULL,
[NetTtlBAmt] [float]
NULL,
[NetTtlTAmt] [float]
NULL,
[SmyChgBAmt] [float]
NULL,
[SmyChgTAmt] [float]
NULL,
[SmyTxBsAmt] [float]
NULL,
[SmyTxTrAmt] [float]
NULL,
[GrossBaAll] [float]
NULL,
[GrossBaAllPrec] [int]
NULL,
[GrossBaAllCurOID] [int]
NULL,
[GrossBaAllCur] [varchar]
(3) NULL,
[GrossTrAll] [float]
NULL,
[GrossTrAllPrec] [int]
NULL,
[GrossTrAllCurOID] [int]
NULL,
[GrossTrAllCur] [varchar]
(3) NULL,
[DiscBaAll] [float]
NULL,
[DiscTrAll] [float]
NULL,
[ChrgBaAll] [float]
NULL,
[ChrgTrAll] [float]
NULL,
[TaxBaseAll] [float]
NULL,
[TaxTranAll] [float]
NULL,
[NetTaxBAll] [float]
NULL,
[NetTaxTAll] [float]
NULL,
[NetTtlBAll] [float]
NULL,
[NetTtlTAll] [float]
NULL,
[SmyChgBAll] [float]
NULL,
[SmyChgTAll] [float]
NULL,
[SmyTxBsAll] [float]
NULL,
[SmyTxTrAll] [float]
NULL,
[OrdQtyBas] [float]
NULL,
[OrdQtyBasPrec] [int]
NULL,
[OrdQtyBasUMObjID] [int]
NULL,
[OrdQtyBasUM] [varchar]
(10) NULL,
[OrdWeight] [float]
NULL,
[OrdWeightPrec] [int]
NULL,
[OrdWeightUMObjID] [int]
NULL,
[OrdWeightUM] [varchar]
(10) NULL,
[OrdVol] [float]
NULL,
[OrdVolPrec] [int]
NULL,
[OrdVolUMObjID] [int]
NULL,
[OrdVolUM] [varchar]
(10) NULL,
[CurcDate] [datetime]
NULL,
[OrdCatObjectID] [int]
NULL,
[OrdCat] [varchar]
(16) NULL,
[StdOrdObjectID] [int]
NULL,
[StdOrdInstType] [int]
NOT NULL,
[StdOrdSite] [varchar]
(4) NULL,
[StdOrd] [varchar]
(15) NULL,
[OrdStat] [int]
NOT NULL,
[CloseReq] [int]
NOT NULL,
[PrvOrdSt] [int]
NOT NULL,
[DfltObt] [int]
NULL,
[SellLOBObjectID] [int]
NULL,
[SellLOB] [varchar]
(30) NULL,
[OrdPlcd] [datetime]
NULL,
[OrdCmpd] [datetime]
NULL,
[OrdClsd] [datetime]
NULL,
[OrdCnldate] [datetime]
NULL,
[OrdType] [int]
NOT NULL,
[OrPrty] [int]
NULL,
[OrPrtyVO] [int]
NOT NULL,
[InvcNo] [varchar]
(15) NULL,
[DOrdPrfObjectID] [int]
NULL,
[DOrdPrf] [varchar]
(16) NULL,
[ROrdPrfObjectID] [int]
NULL,
[ROrdPrf] [varchar]
(16) NULL,
[BillMthd] [int]
NOT NULL,
[OrderSusp] [int]
NULL,
[CSRObjectID] [int]
NULL,
[CSR] [varchar]
(15) NULL,
[DfOrdCurObjectID] [int]
NULL,
[DfOrdCur] [varchar]
(3) NULL,
[SellCmpnyObjectID] [int]
NULL,
[SellCmpny] [varchar]
(30) NULL,
[QtyValMPObjectID] [int]
NULL,
[QtyValMP] [varchar]
(30) NULL,
[PORefReq] [int]
NULL,
[POHoldCodeObjectID] [int]
NULL,
[POHoldCode] [varchar]
(15) NULL,
[SmryHldsClassID] [int]
NULL,
[SmryHldsIsEmpty] [int]
NOT NULL,
[InvcRegClassID] [int]
NULL,
[InvcRegIsEmpty] [int]
NOT NULL,
[OrdAckCnt] [int]
NULL,
[ProFormaInvcCnt] [int]
NULL,
[HasHold] [int]
NULL,
[HasBM] [int]
NULL,
[OverCntcObjectID] [int]
NULL,
[OverCntcClassID] [int]
NULL,
[CntcAddrUsd] [int]
NOT NULL,
[OrdRescUsed] [int]
NOT NULL,
[IndCodeObjectID] [int]
NULL,
[IndCode] [varchar]
(20) NULL,
[LineClassID] [int]
NULL,
[LineIsEmpty] [int]
NOT NULL,
[AlwPrdGrpPrcg] [int]
NULL,
[UIUser] [varchar]
(66) NULL,
[UIDate] [datetime]
NULL,
[PlanPrefix] [varchar]
(4) NULL,
[PlanIndex] [int]
NULL,
[ReasonObjectID] [int]
NULL,
[Reason] [varchar]
(5) NULL,
[IntgRefID] [varchar]
(40) NULL,
[IntgSysID] [varchar]
(40) NULL,
[IntgSrcTp] [int]
NULL,
PRIMARY
KEY CLUSTERED
(
[ObjectID]
ASC
)
WITH FILLFACTOR = 90 ON [PRIMARY]
)
ON [PRIMARY]
END
----------------------------------------------
CREATE
TABLE [dbo].[coOrderDeliv](
[ObjectID] [int]
NOT NULL,
[Updates] [int]
NOT NULL,
[InstanceType] [int]
NOT NULL,
[ParentObjectID] [int]
NULL,
[ParentClassID] [int]
NULL,
[SequenceNumber] [int]
NULL,
[CollectionID] [int]
NULL,
[RootParentUpdates] [int]
NULL,
[InvcSiteObjectID] [int]
NULL,
[InvcSite] [varchar]
(4) NULL,
[InvcToTPObjectID] [int]
NULL,
[InvcToTP] [varchar]
(30) NULL,
[RmtToTPObjectID] [int]
NULL,
[RmtToTP] [varchar]
(30) NULL,
[FtCarTPObjectID] [int]
NULL,
[FtCarTP] [varchar]
(30) NULL,
[PayTermsObjectID] [int]
NULL,
[PayTerms] [varchar]
(40) NULL,
[SellCmpnyObjectID] [int]
NULL,
[SellCmpny] [varchar]
(30) NULL,
[SellLOBObjectID] [int]
NULL,
[SellLOB] [varchar]
(30) NULL,
[MinAltFac] [float]
NULL,
[MinAltFacPrec] [int]
NULL,
[MaxAltFac] [float]
NULL,
[MaxAltFacPrec] [int]
NULL,
[ShipToTPObjectID] [int]
NULL,
[ShipToTP] [varchar]
(30) NULL,
[ShipNum] [varchar]
(30) NULL,
[ShipSiteObjectID] [int]
NULL,
[ShipSite] [varchar]
(4) NULL,
[delivplaced] [datetime]
NULL,
[ReqdDelivDate] [datetime]
NULL,
[PromDelivDate] [datetime]
NULL,
[ActDelivDate] [datetime]
NULL,
[ReqdShipDate] [datetime]
NULL,
[PromShipDate] [datetime]
NULL,
[ActShipDate] [datetime]
NULL,
[RcptCompDate] [datetime]
NULL,
[ShipCompDate] [datetime]
NULL,
[CustPONum] [varchar]
(30) NULL,
[CustPOLineNum] [varchar]
(5) NULL,
[CustPODelivNum] [varchar]
(5) NULL,
[SubRescObjectID] [int]
NULL,
[SubRescSite] [varchar]
(4) NULL,
[SubResc] [varchar]
(35) NULL,
[UnitPriceCurAmt] [float]
NULL,
[UnitPriceCurAmtPr] [int]
NULL,
[UnitPriceCurOID] [int]
NULL,
[UnitPriceCur] [varchar]
(3) NULL,
[UnitPriceQty] [float]
NULL,
[UnitPriceQtyPrec] [int]
NULL,
[UnitPriceUMObjID] [int]
NULL,
[UnitPriceUM] [varchar]
(10) NULL,
[PriceUM] [int]
NOT NULL,
[SpecPricUMObjectID] [int]
NULL,
[SpecPricUM] [varchar]
(10) NULL,
[LOCrefObjectID] [int]
NULL,
[LOCref] [varchar]
(30) NULL,
[DelivType] [int]
NOT NULL,
[DevPrty] [int]
NULL,
[EndUseCode] [varchar]
(15) NULL,
[IsSmpl] [int]
NULL,
[NoChg] [int]
NULL,
[CommentClassID] [int]
NULL,
[CommentIsEmpty] [int]
NOT NULL,
[DiscClassID] [int]
NULL,
[DiscIsEmpty] [int]
NOT NULL,
[CndtClassID] [int]
NULL,
[CndtIsEmpty] [int]
NOT NULL,
[TaxesClassID] [int]
NULL,
[TaxesIsEmpty] [int]
NOT NULL,
[CommTPsClassID] [int]
NULL,
[CommTPsIsEmpty] [int]
NOT NULL,
[CharsClassID] [int]
NULL,
[CharsIsEmpty] [int]
NOT NULL,
[OrigOrderObjectID] [int]
NULL,
[OrigOrderSite] [varchar]
(4) NULL,
[OrigOrder] [varchar]
(15) NULL,
[OrigLine] [int]
NULL,
[OrigDeliv] [int]
NULL,
[OrigInvcObjectID] [int]
NULL,
[OrigInvcInvc] [varchar]
(15) NULL,
[ReasonObjectID] [int]
NULL,
[Reason] [varchar]
(5) NULL,
[RMANumber] [varchar]
(20) NULL,
[DlvStat] [int]
NOT NULL,
[FrghtMode] [varchar]
(15) NULL,
[TrnsRteObjectID] [int]
NULL,
[TrnsRte] [varchar]
(30) NULL,
[UnitTypeObjectID] [int]
NULL,
[UnitType] [varchar]
(7) NULL,
[ShpOvrCntcObjectID] [int]
NULL,
[ShpOvrCntcClassID] [int]
NULL,
[ShpAddrUsd] [int]
NOT NULL,
[IsExceptOrder] [int]
NULL,
[PreAssUnit] [varchar]
(20) NULL,
[GenratReservCnt] [int]
NULL,
[GenratReservDate] [datetime]
NULL,
[RcvdFromTPObjectID] [int]
NULL,
[RcvdFromTP] [varchar]
(30) NULL,
[RcdOvrCntcObjectID] [int]
NULL,
[RcdOvrCntcClassID] [int]
NULL,
[RcdAddrUsd] [int]
NOT NULL,
[GrossBaAmt] [float]
NULL,
[GrossBaAmtPrec] [int]
NULL,
[GrossBaAmtCurOID] [int]
NULL,
[GrossBaAmtCur] [varchar]
(3) NULL,
[GrossTrAmt] [float]
NULL,
[GrossTrAmtPrec] [int]
NULL,
[GrossTrAmtCurOID] [int]
NULL,
[GrossTrAmtCur] [varchar]
(3) NULL,
[DiscBaAmt] [float]
NULL,
[DiscTrAmt] [float]
NULL,
[ChrgBaAmt] [float]
NULL,
[ChrgTrAmt] [float]
NULL,
[TaxBaseAmt] [float]
NULL,
[TaxTranAmt] [float]
NULL,
[NetTaxBAmt] [float]
NULL,
[NetTaxTAmt] [float]
NULL,
[NetTtlBAmt] [float]
NULL,
[NetTtlTAmt] [float]
NULL,
[NetPrBAmt] [float]
NULL,
[NetPrTAmt] [float]
NULL,
[OpenAmt] [float]
NULL,
[IsPrim] [int]
NULL,
[IsTrPrim] [int]
NULL,
[OrdQtyBase] [float]
NULL,
[OrdQtyBasePrec] [int]
NULL,
[OrdQtyBaseUMObjID] [int]
NULL,
[OrdQtyBaseUM] [varchar]
(10) NULL,
[OrdWeight] [float]
NULL,
[OrdWeightPrec] [int]
NULL,
[OrdWeightUMObjID] [int]
NULL,
[OrdWeightUM] [varchar]
(10) NULL,
[OrdVol] [float]
NULL,
[OrdVolPrec] [int]
NULL,
[OrdVolUMObjID] [int]
NULL,
[OrdVolUM] [varchar]
(10) NULL,
[OrdQtyPrim] [float]
NULL,
[OrdQtyPrimPrec] [int]
NULL,
[OrdQtyPrimUMObjID] [int]
NULL,
[OrdQtyPrimUM] [varchar]
(10) NULL,
[OrdQtyAlt] [float]
NULL,
[OrdQtyAltPrec] [int]
NULL,
[OrdQtyAltUMObjID] [int]
NULL,
[OrdQtyAltUM] [varchar]
(10) NULL,
[AltFactr] [float]
NULL,
[AltFactrPrec] [int]
NULL,
[ShpQtyPrim] [float]
NULL,
[ShpQtyPrimPrec] [int]
NULL,
[ShpQtyPrimUMObjID] [int]
NULL,
[ShpQtyPrimUM] [varchar]
(10) NULL,
[ShpQtyAlt] [float]
NULL,
[ShpQtyAltPrec] [int]
NULL,
[ShpQtyAltUMObjID] [int]
NULL,
[ShpQtyAltUM] [varchar]
(10) NULL,
[ShAltFtr] [float]
NULL,
[ShAltFtrPrec] [int]
NULL,
[RcptPrQty] [float]
NULL,
[RcptPrQtyPrec] [int]
NULL,
[RcptPrQtyUMObjID] [int]
NULL,
[RcptPrQtyUM] [varchar]
(10) NULL,
[RcptAltQty] [float]
NULL,
[RcptAltQtyPrec] [int]
NULL,
[RcptAltQtyUMObjID] [int]
NULL,
[RcptAltQtyUM] [varchar]
(10) NULL,
[RcptAltFtr] [float]
NULL,
[RcptAltFtrPrec] [int]
NULL,
[DelivQty] [float]
NULL,
[DelivQtyPrec] [int]
NULL,
[DelivQtyUMObjID] [int]
NULL,
[DelivQtyUM] [varchar]
(10) NULL,
[ResQty] [float]
NULL,
[ResExpQty] [float]
NULL,
[ShipQty] [float]
NULL,
[IvbQty] [float]
NULL,
[IvdQty] [float]
NULL,
[CfdQty] [float]
NULL,
[UsdQty] [float]
NULL,
[ShpAltFtr] [float]
NULL,
[ShpAltFtrPrec] [int]
NULL,
[CnfAltFtr] [float]
NULL,
[CnfAltFtrPrec] [int]
NULL,
[PricingQty] [float]
NULL,
[PricingQtyPrec] [int]
NULL,
[PricingQtyUMObjID] [int]
NULL,
[PricingQtyUM] [varchar]
(10) NULL,
[PUMConvRule] [int]
NOT NULL,
[CurcDate] [datetime]
NULL,
[BackOrd] [int]
NULL,
[BckOrdRef] [int]
NULL,
[AttachmntsIsEmpty] [int]
NOT NULL,
[PricingUMVO] [int]
NOT NULL,
[SpecPricUMVO] [int]
NOT NULL,
[InvcRegClassID] [int]
NULL,
[InvcRegIsEmpty] [int]
NOT NULL,
[QtyBreak] [float]
NULL,
[QtyBreakPrec] [int]
NULL,
[QtyBreakUMObjID] [int]
NULL,
[QtyBreakUM] [varchar]
(10) NULL,
[CancDt] [datetime]
NULL,
[ReqLot] [varchar]
(20) NULL,
[ReqSubLot] [varchar]
(5) NULL,
[BillDate] [datetime]
NULL,
[DlvSysDat] [datetime]
NULL,
[CmpDate] [datetime]
NULL,
[RsvDate] [datetime]
NULL,
[URpDate] [datetime]
NULL,
[InvcDat] [datetime]
NULL,
[ValdDat] [datetime]
NULL,
[CancDat] [datetime]
NULL,
[UDFDate1] [datetime]
NULL,
[UDFDate2] [datetime]
NULL,
[UDFDate3] [datetime]
NULL,
[UDFDate4] [datetime]
NULL,
[UDFDate5] [datetime]
NULL,
[UsrEntReqDlvDate] [int]
NULL,
[UsrEntPromDlvDate] [int]
NULL,
[UsrEntPromShipDate] [int]
NULL,
[CstPriceCurAmt] [float]
NULL,
[CstPriceCurAmtPr] [int]
NULL,
[CstPriceCurOID] [int]
NULL,
[CstPriceCur] [varchar]
(3) NULL,
[CstPriceQty] [float]
NULL,
[CstPriceQtyPrec] [int]
NULL,
[CstPriceUMObjID] [int]
NULL,
[CstPriceUM] [varchar]
(10) NULL,
[AlwDisc] [int]
NULL,
[AlwChrg] [int]
NULL,
[DiscLock] [int]
NULL,
[PrcLock] [int]
NULL,
[TaxLock] [int]
NULL,
[RePrce] [int]
NULL,
[DatePrcd] [datetime]
NULL,
[LoadSeq] [int]
NULL,
[LeadTme] [int]
NULL,
[LeadTimeVO] [int]
NOT NULL,
[RescCostCurAmt] [float]
NULL,
[RescCostCurAmtPr] [int]
NULL,
[RescCostCurOID] [int]
NULL,
[RescCostCur] [varchar]
(3) NULL,
[RescCostQty] [float]
NULL,
[RescCostQtyPrec] [int]
NULL,
[RescCostUMObjID] [int]
NULL,
[RescCostUM] [varchar]
(10) NULL,
[SuspDlv] [int]
NULL,
[PrcShtObjectID] [int]
NULL,
[PrcSht] [varchar]
(30) NULL,
[BMState] [int]
NOT NULL,
[PrDlvSta] [int]
NOT NULL,
[HldCodesClassID] [int]
NULL,
[HldCodesIsEmpty] [int]
NOT NULL,
[InvcRulMPObjectID] [int]
NULL,
[InvcRulMPClassID] [int]
NULL,
[SitesMPObjectID] [int]
NULL,
[SitesMPClassID] [int]
NULL,
[LOCMPObjectID] [int]
NULL,
[LOCMPClassID] [int]
NULL,
[NewDlvMPObjectID] [int]
NULL,
[NewDlvMPClassID] [int]
NULL,
[PricRulMPObjectID] [int]
NULL,
[PricRulMPClassID] [int]
NULL,
[ResSubMPObjectID] [int]
NULL,
[ResSubMPClassID] [int]
NULL,
[SellRestMPObjectID] [int]
NULL,
[SellRestMPClassID] [int]
NULL,
[ShipRuleMPObjectID] [int]
NULL,
[ShipRuleMPClassID] [int]
NULL,
[UsrMktProfObjectID] [int]
NULL,
[UsrMktProfClassID] [int]
NULL,
[ATPInqReq] [int]
NULL,
[DelivAvailTP] [int]
NULL,
[PricingTPObjectID] [int]
NULL,
[PricingTPClassID] [int]
NULL,
[PricingTPflag] [int]
NOT NULL,
[PricingTPflagVO] [int]
NOT NULL,
[HasHold] [int]
NULL,
[HasBM] [int]
NULL,
[OverCntcObjectID] [int]
NULL,
[OverCntcClassID] [int]
NULL,
[CntcAddrUsd] [int]
NOT NULL,
[IsTransfer] [int]
NULL,
[IsSysCancel] [int]
NULL,
[ReplDelivNum] [int]
NULL,
[IsXfrShipCompleted] [int]
NULL,
[IsXfrRcptCompleted] [int]
NULL,
[PricingDate] [int]
NOT NULL,
[PricingDateVO] [int]
NOT NULL,
[DiscDate] [int]
NOT NULL,
[DiscDateVO] [int]
NOT NULL,
[PriCndObjectID] [int]
NULL,
[PriCndCondition] [varchar]
(32) NULL,
[PriCndCondGrpID] [int]
NULL,
[PriCndCondGrp] [varchar]
(32) NULL,
[PriCndVO] [int]
NOT NULL,
[DisCndObjectID] [int]
NULL,
[DisCndCondition] [varchar]
(32) NULL,
[DisCndCondGrpID] [int]
NULL,
[DisCndCondGrp] [varchar]
(32) NULL,
[DisCndVO] [int]
NOT NULL,
[InvoiceToTPVO] [int]
NOT NULL,
[RemitToTPVO] [int]
NOT NULL,
[ShipToTPVO] [int]
NOT NULL,
[FrtCarrierTPVO] [int]
NOT NULL,
[DelivPriorityVO] [int]
NOT NULL,
[ShipSiteVO] [int]
NOT NULL,
[InvoiceSiteVO] [int]
NOT NULL,
[PayTermsVO] [int]
NOT NULL,
[FreightModeVO] [int]
NOT NULL,
[ExceptnlOrderVO] [int]
NOT NULL,
[TransRouteVO] [int]
NOT NULL,
[UnitTypeVO] [int]
NOT NULL,
[AltFactorVO] [int]
NOT NULL,
[PlanRequestID] [int]
NULL,
PRIMARY
KEY NONCLUSTERED
(
[ObjectID]
ASC
)
WITH FILLFACTOR = 90 ON [PRIMARY]
)
ON [PRIMARY]
--------------------------------------------
CREATE
TABLE [dbo].[coOrderLineItem](
[ObjectID] [int]
NOT NULL,
[Updates] [int]
NOT NULL,
[InstanceType] [int]
NOT NULL,
[ParentObjectID] [int]
NULL,
[ParentClassID] [int]
NULL,
[SequenceNumber] [int]
NULL,
[CollectionID] [int]
NULL,
[RootParentUpdates] [int]
NULL,
[GrossBaAmt] [float]
NULL,
[GrossBaAmtPrec] [int]
NULL,
[GrossBaAmtCurOID] [int]
NULL,
[GrossBaAmtCur] [varchar]
(3) NULL,
[GrossTrAmt] [float]
NULL,
[GrossTrAmtPrec] [int]
NULL,
[GrossTrAmtCurOID] [int]
NULL,
[GrossTrAmtCur] [varchar]
(3) NULL,
[DiscBaAmt] [float]
NULL,
[DiscTrAmt] [float]
NULL,
[ChrgBaAmt] [float]
NULL,
[ChrgTrAmt] [float]
NULL,
[TaxBaseAmt] [float]
NULL,
[TaxTranAmt] [float]
NULL,
[NetTaxBAmt] [float]
NULL,
[NetTaxTAmt] [float]
NULL,
[NetTtlBAmt] [float]
NULL,
[NetTtlTAmt] [float]
NULL,
[GrossBaAll] [float]
NULL,
[GrossBaAllPrec] [int]
NULL,
[GrossBaAllCurOID] [int]
NULL,
[GrossBaAllCur] [varchar]
(3) NULL,
[GrossTrAll] [float]
NULL,
[GrossTrAllPrec] [int]
NULL,
[GrossTrAllCurOID] [int]
NULL,
[GrossTrAllCur] [varchar]
(3) NULL,
[DiscBaAll] [float]
NULL,
[DiscTrAll] [float]
NULL,
[ChrgBaAll] [float]
NULL,
[ChrgTrAll] [float]
NULL,
[TaxBaseAll] [float]
NULL,
[TaxTranAll] [float]
NULL,
[NetTaxBAll] [float]
NULL,
[NetTaxTAll] [float]
NULL,
[NetTtlBAll] [float]
NULL,
[NetTtlTAll] [float]
NULL,
[OrdQtyBas] [float]
NULL,
[OrdQtyBasPrec] [int]
NULL,
[OrdQtyBasUMObjID] [int]
NULL,
[OrdQtyBasUM] [varchar]
(10) NULL,
[OrdWeight] [float]
NULL,
[OrdWeightPrec] [int]
NULL,
[OrdWeightUMObjID] [int]
NULL,
[OrdWeightUM] [varchar]
(10) NULL,
[OrdVol] [float]
NULL,
[OrdVolPrec] [int]
NULL,
[OrdVolUMObjID] [int]
NULL,
[OrdVolUM] [varchar]
(10) NULL,
[OrdPrQty] [float]
NULL,
[OrdPrQtyPrec] [int]
NULL,
[OrdPrQtyUMObjID] [int]
NULL,
[OrdPrQtyUM] [varchar]
(10) NULL,
[OrdAltQty] [float]
NULL,
[OrdAltQtyPrec] [int]
NULL,
[OrdAltQtyUMObjID] [int]
NULL,
[OrdAltQtyUM] [varchar]
(10) NULL,
[AuthQty] [float]
NULL,
[AuthQtyPrec] [int]
NULL,
[AuthQtyUMObjID] [int]
NULL,
[AuthQtyUM] [varchar]
(10) NULL,
[AltFactr] [float]
NULL,
[AltFactrPrec] [int]
NULL,
[AttachmntsIsEmpty] [int]
NOT NULL,
[BlktOrd] [int]
NULL,
[SCI] [int]
NULL,
[SaleCatObjectID] [int]
NULL,
[SaleCat] [varchar]
(35) NULL,
[SaleCatRescOID] [int]
NULL,
[SaleCatRescSite] [varchar]
(4) NULL,
[SaleCatResource] [varchar]
(35) NULL,
[SaleCatEffDate] [datetime]
NULL,
[SaleCatSctlgTyp] [int]
NULL,
[SaleCatICdeOID] [int]
NULL,
[SaleCatIndCode] [varchar]
(20) NULL,
[SaleCatTrdPOID] [int]
NULL,
[SaleCatTP] [varchar]
(30) NULL,
[OrdRescObjectID] [int]
NULL,
[OrdRescSite] [varchar]
(4) NULL,
[OrdResc] [varchar]
(35) NULL,
[ExpDt] [datetime]
NULL,
[LnStat] [int]
NOT NULL,
[PrLnStat] [int]
NOT NULL,
[SuspDlv] [int]
NULL,
[RsrcPot] [int]
NULL,
[RsrcDT] [int]
NULL,
[PrcProdGrpObjectID] [int]
NULL,
[PrcProdGrp] [varchar]
(30) NULL,
[LnCharClassID] [int]
NULL,
[LnCharIsEmpty] [int]
NOT NULL,
[OrdLnDelivClassID] [int]
NULL,
[OrdLnDelivIsEmpty] [int]
NOT NULL,
[LnCmpd] [datetime]
NULL,
[LnCnldate] [datetime]
NULL,
PRIMARY
KEY NONCLUSTERED
(
[ObjectID]
ASC
)
WITH FILLFACTOR = 90 ON [PRIMARY]
)
ON [PRIMARY]
-----------------------------------------
CREATE
TABLE [dbo].[fdBasResc](
[ObjectID] [int]
NOT NULL,
[ResourceUKObjectID] [int]
NOT NULL,
[ResourceUKInstType] [int]
NOT NULL,
[ResourceUKSite] [varchar]
(4) NULL,
[ResourceUK] [varchar]
(35) NULL,
[Updates] [int]
NOT NULL,
[SecGrp1ObjectID] [int]
NULL,
[SecGrp1ClassID] [int]
NULL,
[SecGrp2ObjectID] [int]
NULL,
[SecGrp2ClassID] [int]
NULL,
[SecGrp3ObjectID] [int]
NULL,
[SecGrp3ClassID] [int]
NULL,
[SecGrp4ObjectID] [int]
NULL,
[SecGrp4ClassID] [int]
NULL,
[SecGrp5ObjectID] [int]
NULL,
[SecGrp5ClassID] [int]
NULL,
[SiteObjectID] [int]
NULL,
[DateCreated] [datetime]
NULL,
[CreatorObjectID] [int]
NULL,
[CreatorClassID] [int]
NULL,
[LastEditDate] [datetime]
NULL,
[LastEditorObjectID] [int]
NULL,
[LastEditorClassID] [int]
NULL,
[CheckedOutDate] [datetime]
NULL,
[CurEditorObjectID] [int]
NULL,
[CurEditorClassID] [int]
NULL,
[AdminSiteObjectID] [int]
NULL,
[AdminSite] [varchar]
(4) NULL,
[AppLock] [int]
NOT NULL,
[ExtendedDescr] [varchar]
(255) NULL,
[Description] [varchar]
(30) NULL,
[Description2] [varchar]
(30) NULL,
[IconName] [varchar]
(30) NULL,
[AttachmntsIsEmpty] [int]
NOT NULL,
[AddOnsIsEmpty] [int]
NOT NULL,
[ResourceType] [int]
NOT NULL,
[GenRoleTyp] [int]
NOT NULL,
[Generic] [int]
NOT NULL,
[PrimUMObjectID] [int]
NULL,
[PrimUM] [varchar]
(10) NULL,
[AltUMObjectID] [int]
NULL,
[AltUM] [varchar]
(10) NULL,
[AltUMFctr] [float]
NULL,
[AltUMFctrPrec] [int]
NULL,
[BasicTemplObjectID] [int]
NULL,
[BasicTemplInstType] [int]
NOT NULL,
[BasicTemplSite] [varchar]
(4) NULL,
[BasicTempl] [varchar]
(35) NULL,
[MfgTmplObjectID] [int]
NULL,
[MfgTmplInstType] [int]
NOT NULL,
[MfgTmplSite] [varchar]
(4) NULL,
[MfgTmpl] [varchar]
(35) NULL,
[InvTmplObjectID] [int]
NULL,
[InvTmplInstType] [int]
NOT NULL,
[InvTmplSite] [varchar]
(4) NULL,
[InvTmpl] [varchar]
(35) NULL,
[LogTmplObjectID] [int]
NULL,
[LogTmplInstType] [int]
NOT NULL,
[LogTmplSite] [varchar]
(4) NULL,
[LogTmpl] [varchar]
(35) NULL,
[CostTmplObjectID] [int]
NULL,
[CostTmplInstType] [int]
NOT NULL,
[CostTmplSite] [varchar]
(4) NULL,
[CostTmpl] [varchar]
(35) NULL,
[PlanTmplObjectID] [int]
NULL,
[PlanTmplInstType] [int]
NOT NULL,
[PlanTmplSite] [varchar]
(4) NULL,
[PlanTmpl] [varchar]
(35) NULL,
[FinTmplObjectID] [int]
NULL,
[FinTmplInstType] [int]
NOT NULL,
[FinTmplSite] [varchar]
(4) NULL,
[FinTmpl] [varchar]
(35) NULL,
[QltyTmplObjectID] [int]
NULL,
[QltyTmplInstType] [int]
NOT NULL,
[QltyTmplSite] [varchar]
(4) NULL,
[QltyTmpl] [varchar]
(35) NULL,
[MfgResDtl1ObjectID] [int]
NULL,
[MfgResDtl1ClassID] [int]
NULL,
[MfgResDtl2ObjectID] [int]
NULL,
[MfgResDtl2ClassID] [int]
NULL,
[InvRescObjectID] [int]
NULL,
[InvRescClassID] [int]
NULL,
[LogRescObjectID] [int]
NULL,
[LogRescClassID] [int]
NULL,
[CostRescObjectID] [int]
NULL,
[CostRescClassID] [int]
NULL,
[PlanRescObjectID] [int]
NULL,
[PlanRescClassID] [int]
NULL,
[FinRescObjectID] [int]
NULL,
[FinRescClassID] [int]
NULL,
[QltyRescObjectID] [int]
NULL,
[QltyRescClassID] [int]
NULL,
[UnivResc] [varchar]
(35) NULL,
[DensityFactor] [float]
NULL,
[DensityFactorPrec] [int]
NULL,
[HazardMaterial] [int]
NOT NULL,
[HazMatCd] [varchar]
(10) NULL,
[MSDSRequired] [int]
NOT NULL,
[MSDSExists] [int]
NOT NULL,
[Potent] [int]
NOT NULL,
[DualQtyTracked] [int]
NOT NULL,
[MiscFld1] [varchar]
(15) NULL,
[MiscFld2] [varchar]
(15) NULL,
[MiscFld4] [varchar]
(30) NULL,
[MiscFld3] [float]
NULL,
[MiscFld3Prec] [int]
NULL,
[StdCostCurAmt] [float]
NULL,
[StdCostCurAmtPr] [int]
NULL,
[StdCostCurOID] [int]
NULL,
[StdCostCur] [varchar]
(3) NULL,
[StdCostQty] [float]
NULL,
[StdCostQtyPrec] [int]
NULL,
[StdCostUMObjID] [int]
NULL,
[StdCostUM] [varchar]
(10) NULL,
[LevelCode] [int]
NOT NULL,
[FixedLevelCode] [int]
NOT NULL,
[CharsClassID] [int]
NULL,
[CharsIsEmpty] [int]
NOT NULL,
[CatCodesCode1] [varchar]
(15) NULL,
[CatCodesCode2] [varchar]
(15) NULL,
[CatCodesCode3] [varchar]
(15) NULL,
[CatCodesCode4] [varchar]
(15) NULL,
[CatCodesCode5] [varchar]
(15) NULL,
[CatCodesCode6] [varchar]
(15) NULL,
[CatCodesCode7] [varchar]
(15) NULL,
[CatCodesCode8] [varchar]
(15) NULL,
[CatCodesCode9] [varchar]
(15) NULL,
[CatCodesCode10] [varchar]
(15) NULL,
[Recycle] [int]
NOT NULL,
[MfgUMObjectID] [int]
NULL,
[MfgUM] [varchar]
(10) NULL,
[CmpnyUKObjectID] [int]
NULL,
[CmpnyUK] [varchar]
(30) NULL,
[RescIpaRefObjectID] [int]
NULL,
[RescIpaRefSite] [varchar]
(4) NULL,
[RescIpaRef] [varchar]
(35) NULL,
[SpecifObjectID] [int]
NULL,
[Specif] [varchar]
(30) NULL,
[RescColor] [int]
NULL,
PRIMARY
KEY CLUSTERED
(
[ObjectID]
ASC
)
WITH FILLFACTOR = 90 ON [PRIMARY]
)
ON [PRIMARY]
---------------------------------------------
CREATE
TABLE [dbo].[fdTradingPartne](
[ObjectID] [int]
NOT NULL,
[TPObjectID] [int]
NOT NULL,
[TPInstType] [int]
NOT NULL,
[TP] [varchar]
(30) NULL,
[Updates] [int]
NOT NULL,
[SecGrp1ObjectID] [int]
NULL,
[SecGrp1ClassID] [int]
NULL,
[SecGrp2ObjectID] [int]
NULL,
[SecGrp2ClassID] [int]
NULL,
[SecGrp3ObjectID] [int]
NULL,
[SecGrp3ClassID] [int]
NULL,
[SecGrp4ObjectID] [int]
NULL,
[SecGrp4ClassID] [int]
NULL,
[SecGrp5ObjectID] [int]
NULL,
[SecGrp5ClassID] [int]
NULL,
[DateCreated] [datetime]
NULL,
[CreatorObjectID] [int]
NULL,
[CreatorClassID] [int]
NULL,
[LastEditDate] [datetime]
NULL,
[LastEditorObjectID] [int]
NULL,
[LastEditorClassID] [int]
NULL,
[CheckedOutDate] [datetime]
NULL,
[CurEditorObjectID] [int]
NULL,
[CurEditorClassID] [int]
NULL,
[AdminSiteObjectID] [int]
NULL,
[AdminSite] [varchar]
(4) NULL,
[AppLock] [int]
NOT NULL,
[ExtDesc] [varchar]
(255) NULL,
[Description] [varchar]
(30) NULL,
[Description2] [varchar]
(30) NULL,
[IconName] [varchar]
(30) NULL,
[AttachmntsIsEmpty] [int]
NOT NULL,
[AddOnsIsEmpty] [int]
NOT NULL,
[MaskingCoIsEmpty] [int]
NOT NULL,
[CurrencyObjectID] [int]
NOT NULL,
[Currency] [varchar]
(3) NULL,
[RptCurrObjectID] [int]
NULL,
[RptCurr] [varchar]
(3) NULL,
[KnownAsName] [varchar]
(30) NULL,
[TPTypeObjectID] [int]
NULL,
[TPType] [varchar]
(20) NULL,
[PrimaryNetObjectID] [int]
NULL,
[PrimaryNetTPNName] [varchar]
(30) NULL,
[ShipToRoleObjectID] [int]
NULL,
[ShipToRoleClassID] [int]
NULL,
[HasShipToRole] [int]
NULL,
[OrderRoleObjectID] [int]
NULL,
[OrderRoleClassID] [int]
NULL,
[HasOrderByRole] [int]
NULL,
[InvoicRoleObjectID] [int]
NULL,
[InvoicRoleClassID] [int]
NULL,
[HasInvoiceToRole] [int]
NULL,
[CommisRoleObjectID] [int]
NULL,
[CommisRoleClassID] [int]
NULL,
[HasCommissionsRole] [int]
NULL,
[TPartyRoleObjectID] [int]
NULL,
[TPartyRoleClassID] [int]
NULL,
[HasThirdPartyRole] [int]
NULL,
[FinEntRoleObjectID] [int]
NULL,
[FinEntRoleClassID] [int]
NULL,
[HasFinRole] [int]
NULL,
[BankRoleObjectID] [int]
NULL,
[BankRoleClassID] [int]
NULL,
[HasBankRole] [int]
NULL,
[FrtCarRoleObjectID] [int]
NULL,
[FrtCarRoleClassID] [int]
NULL,
[HasFrtCarRole] [int]
NULL,
[OrdFrmRoleObjectID] [int]
NULL,
[OrdFrmRoleClassID] [int]
NULL,
[HasOrdFrmRole] [int]
NULL,
[RcvFrmRoleObjectID] [int]
NULL,
[RcvFrmRoleClassID] [int]
NULL,
[HasRecFrmRole] [int]
NULL,
[InvFrmRoleObjectID] [int]
NULL,
[InvFrmRoleClassID] [int]
NULL,
[HasInvFrmRole] [int]
NULL,
[CreditRoleObjectID] [int]
NULL,
[CreditRoleClassID] [int]
NULL,
[HasCreditRole] [int]
NULL,
[ContactsClassID] [int]
NULL,
[ContactsIsEmpty] [int]
NOT NULL,
[CommentsClassID] [int]
NULL,
[CommentsIsEmpty] [int]
NOT NULL,
[IsPerson] [int]
NULL,
[IsBank] [int]
NULL,
PRIMARY
KEY CLUSTERED
(
[ObjectID]
ASC
)
WITH FILLFACTOR = 90 ON [PRIMARY]
)
ON [PRIMARY]
April 12, 2007 at 7:49 am
Found the problem.
The alias was RescAddOn, so it had to be like that instead of RescAddon.[something].
It needed to be exactly the same, case sensitive.
April 12, 2007 at 7:52 am
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply