Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 The multi-part identifier "cude.pg_id" could not b

Author  Topic 

jrosser
Starting Member

14 Posts

Posted - 2008-07-07 : 10:23:09
Is it possible to do what I am attempting below, I am trying to do a inner join with the Left function.

SELECT cube.company_id,customer_id,
customer_name, round(Sum(extended_price),2) AS Sales,
round(Sum(cogs_amount),2) AS Cost,
Sum(qty_shipped) AS Units
FROM Cube
inner join segment_ids on left(cude.pg_id,1) = segment_ids.segment
where invoice_date between '6/1/2008' and '6/30/2008'
GROUP BY cube.company_id,customer_id,customer_name

Jeremy Rosser

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-07-07 : 10:24:41
yes, but you made a spelling mistake

Em
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2008-07-07 : 10:25:16
perhaps a typo cuBe instead of cuDe ?
inner join segment_ids on left(cube.pg_id,1) = segment_ids.segment



KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

jrosser
Starting Member

14 Posts

Posted - 2008-07-07 : 10:33:33
That will do it, thank you so much. sorry to waste your time.

Thanks again

Jeremy Rosser
Go to Top of Page
   

- Advertisement -