Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

want products.pdescription

Posted on 2011-02-21
3
Medium Priority
?
287 Views
Last Modified: 2012-05-11
I want to see products.pdescription (text) for each product


when i add this line
p.pdescription,

I get error
Msg 8156, Level 16, State 1, Line 1
The column 'pdescription' was specified multiple times for 't1'.




select * from (
select pi.packageitemid,pi.packageid,pi.active packageitems_active,p.*,
       
sd.pathid,
sd.accessoryid,
sd.alternatecolors,
sd.description,
sd.specifications,
sd.features,
sd.itemincludes,
sd.accessories,
sd.infoandguides,
sd.rebateinfo,
sd.sunshineactive,
sd.sunshineprice,
sd.sunshinefeed,
sd.pyxisactive,
sd.pyxisprice,
sd.pyxisfeed,
sd.hdewactive,
sd.hdewprice,
sd.hdewfeed,
sd.shippingtype,
sd.shippingpriceground,
sd.shippingprice3day,
sd.shippingprice2day,
sd.shippingprice1day,
sd.shippingpricetruck,
sd.shippingpricetruckexpress,
sd.shippingpricetruckwhite,
sd.pyxispackages,
sd.sunpackages,
sd.ebaydescription,
p.pdescription,
       pi1.productimagesid,pi1.name, -- keep only the columns you required
       count(*) over (partition by pi.productid) productid_cnt,
       ROW_NUMBER() over (partition by pi.productid order by p.price desc) rn
  from packageitems pi
  left join products p on p.productid=pi.productid
 left join sitedata sd on sd.productid=pi.productid  
 left join (select productid,max(productimagesid) productimagesid from productimages group by productid) i on i.productid=p.productid
  left join productimages pi1 on p.productid=pi1.productid and pi1.productimagesid = i.productimagesid
 where pi.packageid=4935) t1
 where rn=1
and productid is not null
order by price desc
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 22

Accepted Solution

by:
Om Prakash earned 1400 total points
ID: 34948944
You have used p.* and also want  to use p.pdescription which will give you above error.

Instead of p.*, specify the field names that you need.
0
 
LVL 13

Assisted Solution

by:Rahul Agarwal
Rahul Agarwal earned 600 total points
ID: 34949296
Specify either column names or put * in the select statement, do not use

Select * and column names both
for the same table because this gives the same

error "The column 'Column Name' was specified multiple times"
0
 

Author Closing Comment

by:rgb192
ID: 34953143
thanks
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question