Share via


[4506] Column names in each view or function must be unique. ERROR

Question

Wednesday, October 21, 2009 6:19 PM

Guys, we are getting the following error message: 

[4506] Column names in each view or function must be unique. Column name 'Email' in view or function 'vw_UserEmail' is specified more than once.

The following SQL command caused the error:

CREATE VIEW dbo.vw_UserEmail

AS

SELECT     dbo.aspnet_Users.UserName AS Email, dbo.tblUser.*

FROM         dbo.aspnet_Users INNER JOIN

**                      dbo.tblUser ON dbo.aspnet_Users.UserId = dbo.tblUser.UserID**

Can someone please help us with this error message!

Thank you!

All replies (1)

Wednesday, October 21, 2009 6:46 PM ✅Answered

remove * and give explicite column name, might solve your problem.
might be "Email" is also a part of * [All].
HTH
Vinay


Vinay Thakur http://vinay-thakur.spaces.live.com/ http://twitter.com/ThakurVinay