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
 SQL Server Administration (2005)
 error

Author  Topic 

mana
Posting Yak Master

102 Posts

Posted - 2014-07-22 : 08:24:42
Posted - 07/22/2014 : 06:35:40
--------------------------------------------------------------------------------

i have the following code but i have the below error:
Msg 4104, Level 16, State 1, Line 4
The multi-part identifier "OrderLineItemTransaction.OrderLineItemTransaction ID" could not be bound.


insert into AMPPU_ARTPU(summeofrepairtime,[offline date])
(select SUM(Reparatur_hr)*60,Offline_date from AMPPU_Alle_Fehlteile
group by Offline_date);

update AMPPU_Alle_Fehlteile
set
summe = (select summeofrepairtime from AMPPU_ARTPU)
where AMPPU_Alle_Fehlteile.Offline_date = AMPPU_ARTPU.offline_date1;

can you help me please?

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-07-22 : 12:49:34
insert into AMPPU_ARTPU(summeofrepairtime,[offline date])
select SUM(Reparatur_hr)*60,Offline_date
from AMPPU_Alle_Fehlteile
group by Offline_date;

update aaf
set summe = aa.summeofrepairtime
from AMPPU_Alle_Fehlteile aaf
join AMPPU_ARTPU aa on aaf.Offline_date = aa.offline_date1;

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2014-07-22 : 12:50:22
I just re-read your post and noticed the object referenced in your error is not even part of your script. You aren't showing us the whole picture. Is there a trigger or something else in play here?

Tara Kizer
SQL Server MVP since 2007
http://weblogs.sqlteam.com/tarad/
Go to Top of Page
   

- Advertisement -