|
Posted by Erland Sommarskog on 08/08/06 21:46
jason.langdale@gmail.com (jason.langdale@gmail.com) writes:
> Thanks for your help. I have rewritten my query but I get an error. It
> might be a basic error but I am a Crystal report designer who suddenly
> has to create his own views. Please let me know what you think :)
>
> ERROR:
> Server: Msg 8156, Level 16, State 1, Procedure historic_sales_2, Line 2
> The column 'SOPNUMBE' was specified multiple times for
> 'historic_sales_2'.
Did you actually try to read the error message? :-) Yes, I realise that
you are not an SQL Server guy, but an error message cannot be much clearer
than this. The column names in a view must be unique, and you have two
columns called SOPNUMBE. Since you join over these column, they obviously
have the same contents, so why include them twice.
By the way, it looks to me that you have a different number of columns in
the two SELECT. That is not going to work out well.
--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
Navigation:
[Reply to this message]
|