{"id":213,"date":"2012-05-17T05:05:11","date_gmt":"2012-05-17T05:05:11","guid":{"rendered":"https:\/\/sqlserverlearner.azurewebsites.net\/2012\/05\/17\/the-column-prefix-a-does-not-match-with-a-table-name-or-alias-name-used-in-the-query\/"},"modified":"2012-05-17T05:05:11","modified_gmt":"2012-05-17T05:05:11","slug":"the-column-prefix-a-does-not-match-with-a-table-name-or-alias-name-used-in-the-query","status":"publish","type":"post","link":"https:\/\/sqlserverlearner.com\/2012\/05\/17\/the-column-prefix-a-does-not-match-with-a-table-name-or-alias-name-used-in-the-query\/","title":{"rendered":"The column prefix ‘A’ does not match with a table name or alias name used in the query"},"content":{"rendered":"

Error Message:
\n
\nMsg 107, Level 15, State 1, Line 1
\nThe column prefix ‘A’ does not match with a table name or alias name used in the query.
\n<\/font><\/p>\n

This error occurs when the correct table name\/alias is not used in the select query.<\/p>\n

Example:<\/strong>
\n[sql]
\nSELECT a.* FROM SYS.tables
\n[\/sql]<\/p>\n

When you execute the above code you get error message Msg 107.<\/p>\n

Fix\/Resolution:<\/strong>
\nCorrect the select list with the correct table names or alias names.<\/p>\n

[sql]
\nSELECT sys.tables.* FROM sys.tables
\n[\/sql]<\/p>\n

[sql]
\nSELECT tables.* FROM sys.tables
\n[\/sql]<\/p>\n

[sql]
\nSELECT T.* FROM sys.tables T
\n[\/sql]<\/p>\n","protected":false},"excerpt":{"rendered":"

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…<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1982,128],"tags":[1983,1984],"_links":{"self":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/213"}],"collection":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/comments?post=213"}],"version-history":[{"count":0,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/posts\/213\/revisions"}],"wp:attachment":[{"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/media?parent=213"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/categories?post=213"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sqlserverlearner.com\/wp-json\/wp\/v2\/tags?post=213"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}