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 |
|
sona
Yak Posting Veteran
68 Posts |
Posted - 2001-12-17 : 01:47:23
|
| hi..Like i am using a join like thisSelect Z.ClassID From (Select A.ClassID , B.ClassID from Table3 A inner join(select a.classid,B.classname.a.startdate,a.enddate, from Table2 Ainner join (select a.classid,a.classname from table1) B on A.ID=B.ID) AS B on A.Classname=B.classname) AS ZI get an error as Classid was specified multiple times as z Like i want both the classid 's with same alias name so that i can use for another join query.But it is not allowing to have same alias name.Any suggestions |
|
|
sona
Yak Posting Veteran
68 Posts |
Posted - 2001-12-17 : 06:02:52
|
| try grouping |
 |
|
|
Arnold Fribble
Yak-finder General
1961 Posts |
Posted - 2001-12-17 : 07:13:31
|
| If you use a subquery as a derived table, the names of the columns must be unique. The subquery that you are aliasing as Z has two columns called ClassID (the A. and B. are not part of the resulting column name). You just need to alias one of the columns to something other than ClassID. |
 |
|
|
|
|
|