470,619 Members | 2,033 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

How to solve "Tables or functions 'inserted' and 'inserted' have the same exposed names. "

Jon
Hi all!
In a insert-trigger I have two joins on the table named inserted.
Obviously this construction gives a name collition beetween the two
joins (since both joins starts from the same table)

Ofcourse I thougt the using

bla JOIN bla ON bla bla bla AS a_different_name would work, but it
does not. Is there a nice solution to this problem?

Any help appriciated
Jul 23 '05 #1
1 2836
You are correct that you need to use an alias. The syntax requires the
"AS alias" immediately after the table name:

SELECT *
FROM x AS A
JOIN x AS B
ON A.z = B.z
JOIN x AS C
ON A.z = B.z

If you need more help, please post your code and explain what the
problem is. Do you get an error message?

--
David Portas
SQL Server MVP
--

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Pelle Beckman | last post: by
reply views Thread by Kevin Bracey | last post: by
3 posts views Thread by ivanov.alexei | last post: by
5 posts views Thread by WP | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.