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
 General SQL Server Forums
 New to SQL Server Programming
 SQL scripts, please help

Author  Topic 

derrick_goi
Starting Member

6 Posts

Posted - 2011-08-08 : 21:24:38
Select A.SC#,A.Item#,A.Custid,A.Comp#,A.Status,A.[P/O#],A.Lot#,
A.DelQty,A.Istentative,A.DelDate,A.AcceptQty,A.AcceptQty as OrderAcceptQty,
B.DO#,B.DelQty,B.LoadingQty,0 as Outbal , B.AcceptQty,
C.CustName,C.CustShortName,C.Salesman,
D.Model#,D.CompType,
E.ActualStoreQty,A.Remark,
D.Flute, pro_cr.PaperWidth,
IsNull(ProcessType1,'')+'-'+IsNull(ProcessType2,'')+'-'+IsNull(ProcessType3,'')+'-'+IsNull(ProcessType4,'')+'-'+IsNull(ProcessType5,'')+'-'+
IsNull(ProcessType6,'')+'-'+IsNull(ProcessType7,'')+'-'+IsNull(ProcessType8,'')+'-'+IsNull(ProcessType9,'')+'-'+IsNull(ProcessType10,'') PFlow
from Orditem A
left join CustProf C on A.Custid=C.Custid
left join CustProd D on A.Custid=D.Custid and A.Comp#=D.Comp#
left join ProdStck E on A.Comp#=E.Comp#
left join Purorder F on A.SC#=F.SC#
left join pro_cr on pro_cr.comp#=A.comp#
left join comp_rec on comp_rec.comp#=A.comp#
full outer join DelOrd B on A.SC#=B.SC# and A.Item#=B.Item
Where F.ForceComplete=0 and A.Status in ('InDel','StorKeep') and
A.Istentative='F' and A.deldate between '2011-06-26' and '2011-08-31'
order by A.deldate




below is my question

how to edit the script if i want to add below script

1.(PURORDER.PO_Qty/PRO_CR.MDOut * PRO_CR.SheetLength )/1000 AS LinearMeter

2. from pro_cr

3. and A.Comp# = PRO_CR.Comp#




???

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2011-08-09 : 02:44:00
you want to add this value in above select list(PURORDER.PO_Qty/PRO_CR.MDOut * PRO_CR.SheetLength )/1000 AS LinearMeter)
Go to Top of Page
   

- Advertisement -