f



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

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
0
4/13/2005 7:45:58 AM
comp.databases.ms-sqlserver 14567 articles. 1 followers. janinepelletier (108) is leader. Post Follow

1 Replies
672 Views

Similar Articles

[PageSpeed] 18

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
--

0
4/13/2005 8:38:32 AM
Reply: