Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Thread: Correlation

Started 1 month, 1 week ago by Joseph_Amon
> HI All, While trying to execute this view in sql, i got the error message as,"Msg 1013, Level 16, State 1, Procedure sale1, Line 3 The objects "dbo.INV1" and "dbo.INV1" in the FROM clause have the same exposed names. Use correlation names to distinguish them." How do i correct it? I am unable to figure this out. Please suggest. USE [DBNAME] GO /****** Object: View...
Site: SQL Server Forums  SQL Server Forums - site profile
Forum: New to SQL Server  New to SQL Server - forum profile
Total authors: 2 authors
Total thread posts: 2 posts
Thread activity: no new posts during last week
Domain info for: sqlteam.com

Other posts in this thread:

webfred replied 1 month, 1 week ago
> You are joining dbo.INV1 twice so you have to give different alias names for them. For example you can do it like this: dbo.INV1 as Inv1_Doc ON dbo.OINV.DocEntry = Inv1_Doc .DocEntry LEFT OUTER JOIN dbo.INV1 as Inv1_Base ON dbo.ODLN.DocEntry = Inv1_Base .BaseEntry Now you have use that aliases in your select list and WHERE-clause instead of dbo.INV1 ...

 

Top contributing authors

Name
Posts
Joseph_Amon
1
user's latest post:
Correlation
Published (2009-11-14 04:26:00)
> HI All, While trying to execute this view in sql, i got the error message as,"Msg 1013, Level 16, State 1, Procedure sale1, Line 3 The objects "dbo.INV1" and "dbo.INV1" in the FROM clause have the same exposed names. Use correlation names to distinguish them." How do i correct it? I am unable to figure this out. Please suggest. USE [DBNAME] GO /****** Object: View [dbo].[sale1] Script Date: 11/14/2009...
webfred
1
user's latest post:
Correlation
Published (2009-11-14 08:35:00)
> You are joining dbo.INV1 twice so you have to give different alias names for them. For example you can do it like this: dbo.INV1 as Inv1_Doc ON dbo.OINV.DocEntry = Inv1_Doc .DocEntry LEFT OUTER JOIN dbo.INV1 as Inv1_Base ON dbo.ODLN.DocEntry = Inv1_Base .BaseEntry Now you have use that aliases in your select list and WHERE-clause instead of dbo.INV1 No, you're never too old to Yak'n'Roll if you're too young to die.

Related threads on "SQL Server Forums":

Related threads on other sites:

Thread profile page for "Correlation" on http://www.sqlteam.com. This report page is a snippet summary view from a single thread "Correlation", located on the Message Board at http://www.sqlteam.com. This thread profile page shows the thread statistics for: Total Authors, Total Thread Posts, and Thread Activity