Quantcast
Channel: SQL Errors – SQLSERVERLEARNER
Viewing all articles
Browse latest Browse all 74

The column prefix ‘A’ does not match with a table name or alias name used in the query

$
0
0

Error Message:

Msg 107, Level 15, State 1, Line 1
The column prefix ‘A’ does not match with a table name or alias name used in the query.

This error occurs when the correct table name/alias is not used in the select query.

Example:
[sql]
SELECT a.* FROM SYS.tables
[/sql]

When you execute the above code you get error message Msg 107.

Fix/Resolution:
Correct the select list with the correct table names or alias names.

[sql]
SELECT sys.tables.* FROM sys.tables
[/sql]

[sql]
SELECT tables.* FROM sys.tables
[/sql]

[sql]
SELECT T.* FROM sys.tables T
[/sql]


Viewing all articles
Browse latest Browse all 74

Trending Articles