distal-attribute
distal-attribute
distal-attribute
distal-attribute

MS MSQL 2000K error

User, date Message
Written by roxwal
5 months ago
Category: General
3 posts since Fri, 26 Nov 10
SELECT C.CONSTRAINT_NAME, C.CONSTRAINT_TYPE, K.COLUMN_NAME
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS C
INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS K ON C.CONSTRAINT_NAME = K.CONSTRAINT_NAME AND K.TABLE_NAME='directory' AND TABLE_CATALOG='BTS_DIR'
WHERE C.CONSTRAINT_TYPE IN ('PRIMARY KEY', 'UNIQUE')
ORDER BY K.ORDINAL_POSITION;
/* Errore SQL (209): Ambiguous column name 'TABLE_CATALOG'. */
/* Affected rows: 0 Righe trovate: 0 Avvisi: 0 Durata di 0 of 1 query: 0,000 sec. */

can fix?
can use k.TABLE_CATALOG

TKS
Written by ansgar
5 months ago
5015 posts since Fri, 07 Apr 06
Fixed in r4761
 

Please login to leave a reply, or register at first.