Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Wrox's SQL Server 2005 Express Edition Starter Kit ISBN: 978-0-7645-8923-2
This is the forum to discuss the Wrox book Wrox's SQL Server 2005 Express Edition Starter Kit by Rajesh George, Lance Delano; ISBN: 9780764589232
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Wrox's SQL Server 2005 Express Edition Starter Kit ISBN: 978-0-7645-8923-2 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Display Modes
  #1 (permalink)  
Old May 7th, 2006, 10:56 PM
Registered User
Join Date: May 2006
Location: Indianapolis, IN, USA.
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default View example failed

When I attempted to try the view example on page 41

using this code:
CREATE VIEW InventoryPublisherView AS
(SELECT * FROM Inventory AS I FULL OUTER JOIN Publisher AS P ON I.ID=P.InventoryID)

I received the following error:

Msg 4506, Level 16, State 1, Procedure IPV, Line 2
Column names in each view or function must be unique. Column name 'ID' in view or function 'IPV' is specified more than once.

I tried using only the code part (in the brackets) - not the view part and the code worked ok. so I am confused as to what went wrong in the view specification.

Reply With Quote
  #2 (permalink)  
Old May 15th, 2006, 02:53 PM
Authorized User
Join Date: Nov 2003
Location: Ellicott City, Maryland, USA.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts

Hi davwein,

The code statements of Using Views on Page 41 do not work in my Windows XP Pro PC that is on Microsoft Windows NT 4 LAN Syste. I got the following error messages in Parse or Execute without Results:

Msg 156, Level 15, State 1, Procedure InventoryPublisherView, Line 3

Incorrect syntax near the keyword 'SELECT'.

Msg 111, Level 15, State 1, Procedure InventoryPublisherView, Line 6

'ALTER VIEW' must be the first statement in a query batch.

I want to try your modified code statements (that worked in your PC/system - what kind of your PC and LAN System did yopu use?)in my PC. Please post your complete modified code statements on this Forum.
Scott Chang

Scott Chang
Reply With Quote
  #3 (permalink)  
Old August 21st, 2010, 02:39 PM
Registered User
Join Date: Aug 2010
Location: Crawley, UK
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Skype™ to willetfarm
Default Try it out p41

This thread looks ancient, but I'll post in case anyone else has the same problem.

I'm running SSMSE 2005 on XP SP3.

davewein received this error message because the tables created earlier, 'Inventory' and 'Publisher' BOTH have columns, defined as primary keys, with the same name, "ID".

One just needs to delete either table and recreate them with differing column names. Once I did this, the queries completed successfully.

Hope this helps
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent - Send mail with plain view and html view ashish.dadhwal ASP.NET 2.0 Professional 0 November 27th, 2008 12:49 AM
any idea to view xml as it is but in hieratic view seco XSLT 2 January 17th, 2008 07:49 AM
Help Grid View Drop Down List, view all jskinner123 ASP.NET 2.0 Basics 0 November 25th, 2007 05:25 PM
Login View and Failed User Name timeware ASP.NET 2.0 Professional 7 June 22nd, 2007 09:19 AM
populate details view or list view non empty rows iinfoque ASP.NET 2.0 Basics 0 March 11th, 2007 06:11 AM

All times are GMT -4. The time now is 04:10 AM.

Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.