|
Home > Archive > WebSphere Portal Server > June 2007 > Transfer to SQL Server 2005: Multi-part identifier could not be
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Transfer to SQL Server 2005: Multi-part identifier could not be
|
|
|
| Hello,
I am desperately trying to move data from the default Cloudspace Database to MS SQL Server 2005, of course following the official documentation.
What happens is that WebSphere's Configuration Wizard fails because of an error caused by the SQL Script. Trouble is, I can't bring it to work not even in the SQL Server Management Studio.
This is the error as it appears in the ConfigTrace.log; BTW, I got the same error trying to execute the query in the Management Studio:
Error during statement execution!
com.microsoft.sqlserver.jdbc.SQLServerException: The multi-part identifier "community.APP_DESC.WEB_MOD_OID" could not be bound.
What follows is the code generated by the wizard. I figured out that the error is caused by the last "check"-constraint.
CREATE TABLE community.APP_DESC (
OID BINARY(18) NOT NULL,
TYPE INTEGER NOT NULL,
APP_NAME NVARCHAR(255) NOT NULL,
IS_ACTIVE INTEGER NOT NULL,
JSR_VERSION NVARCHAR(255),
GUID NVARCHAR(255),
WEB_MOD_OID BINARY(18),
WEB_MOD_SL BINARY(18),
WSRP_PROD_OID BINARY(18),
WSRP_PROD_SL BINARY(18),
DEFAULT_LOCALE NVARCHAR(64),
CREATED BIGINT NOT NULL,
MODIFIED BIGINT NOT NULL,
WSC_GROUP_ID NVARCHAR(255),
CONSTRAINT PK20 PRIMARY KEY NONCLUSTERED (OID),
CONSTRAINT FK20A FOREIGN KEY (WEB_MOD_OID) REFERENCES community.WEB_MOD (OID) ON DELETE CASCADE,
constraint FK20B FOREIGN KEY (WSRP_PROD_OID) REFERENCES community.WSRP_PROD (OID) ON DELETE CASCADE,
CONSTRAINT CC20A CHECK (((community.APP_DESC.WEB_MOD_OID IS NULL) AND (community.APP_DESC.WEB_MOD_SL IS NOT NULL)) OR ((community.APP_DESC.WEB_MOD_OID IS NOT NULL) AND (community.APP_DESC.WEB_MOD_SL IS NULL)))
)
Thanks in advance,
adapter
| |
| Uwe Daub 2007-06-14, 1:31 pm |
| Hello adapter,
do you solve this problem, because I have it too and I'm interested in a solution.
Thanks in advance.
Uwe
| |
|
| i had an error while i was trying to execute the Common Table expression
as below:
WITH YTDSalesPerson
AS
(
SELECT soh.SalesPersonID, sum(sod.LineTotal) as amount
FROM Sales.SalesOrderHeader soh
JOIN Sales.SalesOrderDetail sod
ON sod.SalesOrderID = soh.SalesOrderID
WHERE soh.Status = 5 -- complete
and soh.OrderDate >= '20040101'
GROUP by soh.SalesPersonID
),
SalesPersonInfo
AS
(
SELECT SalesPersonID, SalesQuota as SalesQuota,
cast(c.LastName + ', ' + c.FirstName as varchar(30)) as SalesPerson
FROM Sales.SalesPerson as s
JOIN HumanResources.Employee as e
on s.SalesPersonID = e.EmployeeID
JOIN Person.Contact as c
on c.ContactID = e.ContactID
)
SELECT SalesPersonInfo.SalesPerson,
(SELECT amount
FROM YTDSalesPerson
WHERE YTDSalesPerson.SalesPersonID = SalespersonInfo.SalesPersonID)
as YTDSales,
(SELECT amount
FROM YTDSalesPerson
WHERE YTDSalesPerson.SalesPersonID = SalespersonInfo.SalesPersonID)
/ (SELECT sum(amount) FROM YTDSalesPerson) as percentOfTotal,
(SELECT amount
FROM YTDSalesPerson
WHERE YTDSalesPerson.SalesPersonID = SalespersonInfo.SalesPersonID) -
SalesPersonInfo.SalesQuota as MetQuota
FROM SalesPersonInfo
********************************
This is in reference for the sample database AdventureWorksDB in x86 mode with SQL Server 2005.
the following error comes up:
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "SalespersonInfo.SalesPersonID" could not be bound.
please let me know what does it signify?
|
|
|
|
|