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

MS MSQL 2000K error

roxwal posted 7 months ago in General
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
ansgar posted 7 months ago
Fixed in r4761

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