Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

SQL Server 2005: Multi-part identifier could not be bound

$
0
0
Hello,

I use IBM WebSphere Portal and am desperately trying to move data from the default Cloudspace Database to MS SQL Server 2005, of course following the official guidelines.

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.

What follows is the code generated by the script. The error is caused by the last "check"-constraint (colored in red).

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)))
)

And that's what SQL Server 2005 told me:

Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "community.APP_DESC.WEB_MOD_OID" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "community.APP_DESC.WEB_MOD_SL" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "community.APP_DESC.WEB_MOD_OID" could not be bound.
Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "community.APP_DESC.WEB_MOD_SL" could not be bound.



BTW, as this is a generated script I do not have the possibility to change it. Because it has been released by IBM I am rather convinced that it is correct - therefore I was wondering whether SQL Server 2005 has a known bug that makes it refuse "check"-constraints.

Any hint is very appreciated.

Thanks in advance,
adapter

Viewing all articles
Browse latest Browse all 8428

Trending Articles