Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
noks
Starting Member
9 Posts |
Posted - 2007-05-21 : 06:02:59
|
| Hi guysI wanna display the compname [in competencies tbl], firstname & surname [in users tbl], position level [in positions tbl] and userlevel [in compuser tbl] but i get the ff error msgMicrosoft OLE DB Provider for ODBC Drivers error '80040e14' [Microsoft][ODBC SQL Server Driver][SQL Server]The column prefix 'CompUser' does not match with a table name or alias name used in the query. My code:SELECT compname, firstname,surname ,level AS positionlevelFROM positions, compuser, users A, compposINNER JOIN Competencies ON comppos.Compid = competencies.CompidRIGHT JOIN UsersON CompUser.UserID = Users.UserIDWHERE Users.UserID = '999209'OR Users.UserID = 'helpdesk1'OR Users.UserID = '999339'OR Users.UserID = 'helpdesk5'ORDER BY CompNamePls kindly helpNoks |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2007-05-21 : 06:19:33
|
| your select is wrong.read about how to properly write joins.From table1 t1 join table2 t2 on t1.id = t2.idjoin table3 t3 on t2.id = t3.id..._______________________________________________Causing trouble since 1980blog: http://weblogs.sqlteam.com/mladenp |
 |
|
|
|
|
|